[PATCH 13/16] common: Drop linux/types.h from common header

Simon Glass sjg at chromium.org
Mon Aug 3 00:59:37 CEST 2020


Move this out of the common header and include it only where needed.

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

 api/api_display.c                                             | 1 +
 api/api_private.h                                             | 1 +
 api/api_storage.c                                             | 1 +
 arch/arc/include/asm/sections.h                               | 1 +
 arch/arc/include/asm/u-boot-arc.h                             | 1 +
 arch/arc/lib/bootm.c                                          | 2 ++
 arch/arc/lib/cache.c                                          | 1 +
 arch/arc/lib/cpu.c                                            | 1 +
 arch/arc/lib/relocate.c                                       | 1 +
 arch/arc/lib/reset.c                                          | 2 ++
 arch/arm/cpu/arm1136/mx31/generic.c                           | 1 +
 arch/arm/cpu/arm1136/mx35/generic.c                           | 1 +
 arch/arm/cpu/arm720t/interrupts.c                             | 1 +
 arch/arm/cpu/arm920t/ep93xx/cpu.c                             | 1 +
 arch/arm/cpu/arm920t/ep93xx/led.c                             | 1 +
 arch/arm/cpu/arm920t/ep93xx/speed.c                           | 1 +
 arch/arm/cpu/arm926ejs/armada100/cpu.c                        | 1 +
 arch/arm/cpu/arm926ejs/armada100/dram.c                       | 1 +
 arch/arm/cpu/arm926ejs/armada100/timer.c                      | 1 +
 arch/arm/cpu/arm926ejs/cache.c                                | 1 +
 arch/arm/cpu/arm926ejs/mx25/generic.c                         | 1 +
 arch/arm/cpu/arm926ejs/mx25/reset.c                           | 1 +
 arch/arm/cpu/arm926ejs/mx27/generic.c                         | 1 +
 arch/arm/cpu/arm926ejs/mx27/reset.c                           | 1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c                           | 1 +
 arch/arm/cpu/arm926ejs/mxs/clock.c                            | 1 +
 arch/arm/cpu/arm926ejs/mxs/iomux.c                            | 1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c                              | 2 ++
 arch/arm/cpu/arm926ejs/mxs/mxs_init.h                         | 1 +
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c                         | 1 +
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c                     | 2 ++
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c                   | 2 ++
 arch/arm/cpu/arm926ejs/mxs/timer.c                            | 1 +
 arch/arm/cpu/arm926ejs/spear/cpu.c                            | 1 +
 arch/arm/cpu/arm926ejs/spear/reset.c                          | 1 +
 arch/arm/cpu/arm926ejs/spear/spear600.c                       | 1 +
 arch/arm/cpu/arm926ejs/spear/spl.c                            | 1 +
 .../cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c   | 1 +
 .../arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c | 1 +
 .../cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c  | 1 +
 .../cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c   | 1 +
 arch/arm/cpu/arm926ejs/spear/spr_misc.c                       | 1 +
 arch/arm/cpu/arm926ejs/spear/timer.c                          | 1 +
 arch/arm/cpu/arm946es/cpu.c                                   | 1 +
 arch/arm/cpu/armv7/arch_timer.c                               | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-bsc.c                         | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-core.c                        | 2 ++
 arch/arm/cpu/armv7/bcm235xx/clk-core.h                        | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-sdio.c                        | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c                     | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-bsc.c                         | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.c                        | 2 ++
 arch/arm/cpu/armv7/bcm281xx/clk-core.h                        | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-sdio.c                        | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c                     | 1 +
 arch/arm/cpu/armv7/bcm281xx/reset.c                           | 1 +
 arch/arm/cpu/armv7/bcmcygnus/reset.c                          | 1 +
 arch/arm/cpu/armv7/bcmnsp/reset.c                             | 1 +
 arch/arm/cpu/armv7/cache_v7.c                                 | 1 +
 arch/arm/cpu/armv7/cp15.c                                     | 2 ++
 arch/arm/cpu/armv7/cpu.c                                      | 1 +
 arch/arm/cpu/armv7/exception_level.c                          | 1 +
 arch/arm/cpu/armv7/iproc-common/armpll.c                      | 1 +
 arch/arm/cpu/armv7/iproc-common/timer.c                       | 1 +
 arch/arm/cpu/armv7/kona-common/clk-stubs.c                    | 1 +
 arch/arm/cpu/armv7/ls102xa/clock.c                            | 2 ++
 arch/arm/cpu/armv7/ls102xa/cpu.c                              | 2 ++
 arch/arm/cpu/armv7/ls102xa/fdt.c                              | 2 ++
 arch/arm/cpu/armv7/ls102xa/fsl_epu.c                          | 1 +
 arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c                   | 2 ++
 arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h                   | 1 +
 arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c                     | 2 ++
 arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c                   | 1 +
 arch/arm/cpu/armv7/ls102xa/soc.c                              | 2 ++
 arch/arm/cpu/armv7/ls102xa/spl.c                              | 1 +
 arch/arm/cpu/armv7/ls102xa/timer.c                            | 1 +
 arch/arm/cpu/armv7/mpu_v7r.c                                  | 1 +
 arch/arm/cpu/armv7/psci-common.c                              | 1 +
 arch/arm/cpu/armv7/s5p-common/cpu_info.c                      | 1 +
 arch/arm/cpu/armv7/s5p-common/pwm.c                           | 1 +
 arch/arm/cpu/armv7/s5p-common/sromc.c                         | 1 +
 arch/arm/cpu/armv7/s5p-common/timer.c                         | 1 +
 arch/arm/cpu/armv7/s5p4418/cpu.c                              | 1 +
 arch/arm/cpu/armv7/stv0991/reset.c                            | 1 +
 arch/arm/cpu/armv7/stv0991/timer.c                            | 1 +
 arch/arm/cpu/armv7/sunxi/psci.c                               | 1 +
 arch/arm/cpu/armv7/sunxi/timer.c                              | 1 +
 arch/arm/cpu/armv7/syslib.c                                   | 1 +
 arch/arm/cpu/armv7/vf610/generic.c                            | 2 ++
 arch/arm/cpu/armv7/vf610/timer.c                              | 1 +
 arch/arm/cpu/armv7/virt-v7.c                                  | 2 ++
 arch/arm/cpu/armv7m/cache.c                                   | 1 +
 arch/arm/cpu/armv7m/cpu.c                                     | 1 +
 arch/arm/cpu/armv7m/mpu.c                                     | 1 +
 arch/arm/cpu/armv7m/systick-timer.c                           | 1 +
 arch/arm/cpu/armv8/cache_v8.c                                 | 3 +++
 arch/arm/cpu/armv8/cpu.c                                      | 2 ++
 arch/arm/cpu/armv8/exception_level.c                          | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c                       | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/cpu.h                       | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c                       | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c          | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c           | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c          | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c           | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/icid.c                      | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c                | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1043a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1088a_serdes.c            | 3 +++
 arch/arm/cpu/armv8/fsl-layerscape/ls2080a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/lx2160a_serdes.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c                        | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c                       | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/soc.c                       | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/spl.c                       | 2 ++
 arch/arm/cpu/armv8/fwcall.c                                   | 1 +
 arch/arm/cpu/armv8/generic_timer.c                            | 1 +
 arch/arm/cpu/armv8/hisilicon/pinmux.c                         | 1 +
 arch/arm/cpu/armv8/s32v234/cpu.c                              | 1 +
 arch/arm/cpu/armv8/s32v234/cpu.h                              | 1 +
 arch/arm/cpu/armv8/s32v234/generic.c                          | 1 +
 arch/arm/cpu/armv8/sec_firmware.c                             | 3 +++
 arch/arm/cpu/armv8/spl_data.c                                 | 1 +
 arch/arm/cpu/pxa/cache.c                                      | 1 +
 arch/arm/cpu/pxa/cpuinfo.c                                    | 1 +
 arch/arm/cpu/pxa/pxa2xx.c                                     | 1 +
 arch/arm/cpu/sa1100/cpu.c                                     | 1 +
 arch/arm/cpu/sa1100/timer.c                                   | 1 +
 arch/arm/include/asm/arch-am33xx/clk_synthesizer.h            | 1 +
 arch/arm/include/asm/arch-am33xx/clock.h                      | 1 +
 arch/arm/include/asm/arch-am33xx/ddr_defs.h                   | 1 +
 arch/arm/include/asm/arch-am33xx/sys_proto.h                  | 1 +
 arch/arm/include/asm/arch-armada100/cpu.h                     | 1 +
 arch/arm/include/asm/arch-armada100/spi.h                     | 1 +
 arch/arm/include/asm/arch-armada100/utmi-armada100.h          | 1 +
 arch/arm/include/asm/arch-armv7/globaltimer.h                 | 1 +
 arch/arm/include/asm/arch-armv7/sysctrl.h                     | 1 +
 arch/arm/include/asm/arch-armv7/systimer.h                    | 1 +
 arch/arm/include/asm/arch-armv7/wdt.h                         | 1 +
 arch/arm/include/asm/arch-aspeed/scu_ast2500.h                | 1 +
 arch/arm/include/asm/arch-aspeed/sdram_ast2500.h              | 1 +
 arch/arm/include/asm/arch-aspeed/timer.h                      | 1 +
 arch/arm/include/asm/arch-aspeed/wdt.h                        | 1 +
 arch/arm/include/asm/arch-ep93xx/ep93xx.h                     | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/clock.h              | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/cpu.h                | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h        | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h         | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/gpio.h               | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h        | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h        | 1 +
 arch/arm/include/asm/arch-fsl-layerscape/mp.h                 | 1 +
 arch/arm/include/asm/arch-hi6220/dwmmc.h                      | 1 +
 arch/arm/include/asm/arch-hi6220/gpio.h                       | 1 +
 arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h       | 1 +
 arch/arm/include/asm/arch-hi6220/pinmux.h                     | 1 +
 arch/arm/include/asm/arch-imx/cpu.h                           | 1 +
 arch/arm/include/asm/arch-imx8/clock.h                        | 1 +
 arch/arm/include/asm/arch-imx8/gpio.h                         | 1 +
 arch/arm/include/asm/arch-imx8/image.h                        | 1 +
 arch/arm/include/asm/arch-imx8/iomux.h                        | 1 +
 arch/arm/include/asm/arch-imx8/sci/rpc.h                      | 1 +
 arch/arm/include/asm/arch-imx8/sci/sci.h                      | 1 +
 arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h             | 1 +
 arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h               | 1 +
 arch/arm/include/asm/arch-imx8/sci/svc/rm/api.h               | 1 +
 arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h             | 1 +
 arch/arm/include/asm/arch-imx8m/clock.h                       | 1 +
 arch/arm/include/asm/arch-imx8m/clock_imx8mm.h                | 1 +
 arch/arm/include/asm/arch-imx8m/ddr.h                         | 1 +
 arch/arm/include/asm/arch-imxrt/gpio.h                        | 1 +
 arch/arm/include/asm/arch-lpc32xx/dma.h                       | 1 +
 arch/arm/include/asm/arch-lpc32xx/gpio.h                      | 1 +
 arch/arm/include/asm/arch-lpc32xx/i2c.h                       | 1 +
 arch/arm/include/asm/arch-lpc32xx/mux.h                       | 1 +
 arch/arm/include/asm/arch-ls102xa/clock.h                     | 1 +
 arch/arm/include/asm/arch-ls102xa/fsl_serdes.h                | 1 +
 arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h             | 1 +
 arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h         | 1 +
 arch/arm/include/asm/arch-mediatek/reset.h                    | 1 +
 arch/arm/include/asm/arch-meson/clock-gx.h                    | 1 +
 arch/arm/include/asm/arch-meson/sm.h                          | 1 +
 arch/arm/include/asm/arch-mvebu/spi.h                         | 1 +
 arch/arm/include/asm/arch-mx27/gpio.h                         | 1 +
 arch/arm/include/asm/arch-mx27/imx-regs.h                     | 1 +
 arch/arm/include/asm/arch-mx27/regs-rtc.h                     | 1 +
 arch/arm/include/asm/arch-mx31/clock.h                        | 1 +
 arch/arm/include/asm/arch-mx31/sys_proto.h                    | 1 +
 arch/arm/include/asm/arch-mx35/clock.h                        | 1 +
 arch/arm/include/asm/arch-mx35/sys_proto.h                    | 1 +
 arch/arm/include/asm/arch-mx5/clock.h                         | 1 +
 arch/arm/include/asm/arch-mx5/crm_regs.h                      | 1 +
 arch/arm/include/asm/arch-mx6/crm_regs.h                      | 1 +
 arch/arm/include/asm/arch-mx6/mx6-ddr.h                       | 1 +
 arch/arm/include/asm/arch-mx6/mxc_hdmi.h                      | 1 +
 arch/arm/include/asm/arch-mx6/sys_proto.h                     | 1 +
 arch/arm/include/asm/arch-mx7/clock.h                         | 1 +
 arch/arm/include/asm/arch-mx7/clock_slice.h                   | 1 +
 arch/arm/include/asm/arch-mx7/crm_regs.h                      | 1 +
 arch/arm/include/asm/arch-mx7/imx-regs.h                      | 1 +
 arch/arm/include/asm/arch-mx7/mx7-ddr.h                       | 1 +
 arch/arm/include/asm/arch-mx7ulp/clock.h                      | 1 +
 arch/arm/include/asm/arch-mx7ulp/gpio.h                       | 1 +
 arch/arm/include/asm/arch-mx7ulp/pcc.h                        | 1 +
 arch/arm/include/asm/arch-mx7ulp/scg.h                        | 1 +
 arch/arm/include/asm/arch-mxs/clock.h                         | 1 +
 arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h             | 1 +
 arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h             | 1 +
 arch/arm/include/asm/arch-mxs/regs-digctl.h                   | 1 +
 arch/arm/include/asm/arch-mxs/regs-pinctrl.h                  | 1 +
 arch/arm/include/asm/arch-mxs/regs-power-mx23.h               | 1 +
 arch/arm/include/asm/arch-mxs/regs-power-mx28.h               | 1 +
 arch/arm/include/asm/arch-mxs/regs-ssp.h                      | 1 +
 arch/arm/include/asm/arch-mxs/regs-usb.h                      | 1 +
 arch/arm/include/asm/arch-mxs/sys_proto.h                     | 1 +
 arch/arm/include/asm/arch-omap3/dma.h                         | 1 +
 arch/arm/include/asm/arch-omap3/dss.h                         | 1 +
 arch/arm/include/asm/arch-omap3/mem.h                         | 1 +
 arch/arm/include/asm/arch-omap3/musb.h                        | 1 +
 arch/arm/include/asm/arch-omap3/sys_proto.h                   | 1 +
 arch/arm/include/asm/arch-omap4/clock.h                       | 1 +
 arch/arm/include/asm/arch-omap4/sys_proto.h                   | 1 +
 arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h              | 1 +
 arch/arm/include/asm/arch-omap5/sys_proto.h                   | 1 +
 arch/arm/include/asm/arch-pxa/pxa.h                           | 1 +
 arch/arm/include/asm/arch-pxa/regs-mmc.h                      | 1 +
 arch/arm/include/asm/arch-pxa/regs-uart.h                     | 1 +
 arch/arm/include/asm/arch-pxa/regs-usb.h                      | 1 +
 arch/arm/include/asm/arch-rk3308/cru_rk3308.h                 | 1 +
 arch/arm/include/asm/arch-rockchip/bootrom.h                  | 1 +
 arch/arm/include/asm/arch-rockchip/clock.h                    | 2 ++
 arch/arm/include/asm/arch-rockchip/cpu_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_px30.h                 | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3036.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3128.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3188.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk322x.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3328.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rk3399.h               | 1 +
 arch/arm/include/asm/arch-rockchip/cru_rv1108.h               | 1 +
 arch/arm/include/asm/arch-rockchip/ddr_rk3188.h               | 1 +
 arch/arm/include/asm/arch-rockchip/ddr_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/ddr_rk3368.h               | 1 +
 arch/arm/include/asm/arch-rockchip/edp_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/f_rockusb.h                | 1 +
 arch/arm/include/asm/arch-rockchip/gpio.h                     | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3188.h               | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3328.h               | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3368.h               | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3399.h               | 1 +
 arch/arm/include/asm/arch-rockchip/grf_rv1108.h               | 1 +
 arch/arm/include/asm/arch-rockchip/i2c.h                      | 1 +
 arch/arm/include/asm/arch-rockchip/misc.h                     | 1 +
 arch/arm/include/asm/arch-rockchip/pmu_rk3188.h               | 1 +
 arch/arm/include/asm/arch-rockchip/pmu_rk3288.h               | 1 +
 arch/arm/include/asm/arch-rockchip/pmu_rk3399.h               | 1 +
 arch/arm/include/asm/arch-rockchip/sdram.h                    | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_common.h             | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_msch.h               | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h          | 2 ++
 arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h           | 2 ++
 arch/arm/include/asm/arch-rockchip/sdram_px30.h               | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_rk3036.h             | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_rk322x.h             | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_rk3288.h             | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_rk3328.h             | 1 +
 arch/arm/include/asm/arch-rockchip/sdram_rk3399.h             | 1 +
 arch/arm/include/asm/arch-rockchip/timer.h                    | 1 +
 arch/arm/include/asm/arch-rockchip/vop_rk3288.h               | 1 +
 arch/arm/include/asm/arch-s32v234/lpddr2.h                    | 1 +
 arch/arm/include/asm/arch-spear/gpio.h                        | 1 +
 arch/arm/include/asm/arch-spear/spr_defs.h                    | 1 +
 arch/arm/include/asm/arch-spear/spr_emi.h                     | 1 +
 arch/arm/include/asm/arch-spear/spr_gpt.h                     | 1 +
 arch/arm/include/asm/arch-spear/spr_misc.h                    | 1 +
 arch/arm/include/asm/arch-spear/spr_ssp.h                     | 1 +
 arch/arm/include/asm/arch-spear/spr_syscntl.h                 | 1 +
 arch/arm/include/asm/arch-stm32/gpio.h                        | 1 +
 arch/arm/include/asm/arch-stm32f4/stm32.h                     | 1 +
 arch/arm/include/asm/arch-stm32f4/stm32_pwr.h                 | 1 +
 arch/arm/include/asm/arch-stm32f7/stm32.h                     | 1 +
 arch/arm/include/asm/arch-stm32f7/stm32_pwr.h                 | 1 +
 arch/arm/include/asm/arch-stm32f7/syscfg.h                    | 1 +
 arch/arm/include/asm/arch-stv0991/gpio.h                      | 1 +
 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h               | 1 +
 arch/arm/include/asm/arch-stv0991/stv0991_creg.h              | 1 +
 arch/arm/include/asm/arch-stv0991/stv0991_gpt.h               | 1 +
 arch/arm/include/asm/arch-stv0991/stv0991_wdru.h              | 1 +
 arch/arm/include/asm/arch-sunxi/ccu.h                         | 1 +
 arch/arm/include/asm/arch-sunxi/clock_sun4i.h                 | 1 +
 arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h             | 1 +
 arch/arm/include/asm/arch-sunxi/clock_sun6i.h                 | 1 +
 arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h            | 1 +
 arch/arm/include/asm/arch-sunxi/clock_sun9i.h                 | 1 +
 arch/arm/include/asm/arch-sunxi/cpucfg.h                      | 1 +
 arch/arm/include/asm/arch-sunxi/display.h                     | 1 +
 arch/arm/include/asm/arch-sunxi/display2.h                    | 1 +
 arch/arm/include/asm/arch-sunxi/dma_sun4i.h                   | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun4i.h                  | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h              | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun6i.h                  | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun8i_a23.h              | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h              | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h             | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sun9i.h                  | 1 +
 arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h               | 1 +
 arch/arm/include/asm/arch-sunxi/lcdc.h                        | 1 +
 arch/arm/include/asm/arch-sunxi/prcm.h                        | 1 +
 arch/arm/include/asm/arch-sunxi/pwm.h                         | 1 +
 arch/arm/include/asm/arch-sunxi/rsb.h                         | 1 +
 arch/arm/include/asm/arch-sunxi/spl.h                         | 1 +
 arch/arm/include/asm/arch-sunxi/tve.h                         | 1 +
 arch/arm/include/asm/arch-sunxi/tzpc.h                        | 1 +
 arch/arm/include/asm/arch-sunxi/watchdog.h                    | 1 +
 arch/arm/include/asm/arch-tegra/apb_misc.h                    | 1 +
 arch/arm/include/asm/arch-tegra/bpmp_abi.h                    | 1 +
 arch/arm/include/asm/arch-tegra/cboot.h                       | 1 +
 arch/arm/include/asm/arch-tegra/clk_rst.h                     | 1 +
 arch/arm/include/asm/arch-tegra/clock.h                       | 1 +
 arch/arm/include/asm/arch-tegra/dc.h                          | 1 +
 arch/arm/include/asm/arch-tegra/fuse.h                        | 1 +
 arch/arm/include/asm/arch-tegra/gpio.h                        | 1 +
 arch/arm/include/asm/arch-tegra/ivc.h                         | 1 +
 arch/arm/include/asm/arch-tegra/pmc.h                         | 1 +
 arch/arm/include/asm/arch-tegra/pwm.h                         | 1 +
 arch/arm/include/asm/arch-tegra/scu.h                         | 1 +
 arch/arm/include/asm/arch-tegra/tegra_ahub.h                  | 1 +
 arch/arm/include/asm/arch-tegra/tegra_i2s.h                   | 1 +
 arch/arm/include/asm/arch-tegra/uart.h                        | 1 +
 arch/arm/include/asm/arch-tegra/usb.h                         | 1 +
 arch/arm/include/asm/arch-tegra/warmboot.h                    | 1 +
 arch/arm/include/asm/arch-tegra114/flow.h                     | 1 +
 arch/arm/include/asm/arch-tegra114/gp_padctrl.h               | 1 +
 arch/arm/include/asm/arch-tegra114/mc.h                       | 1 +
 arch/arm/include/asm/arch-tegra114/sysctr.h                   | 1 +
 arch/arm/include/asm/arch-tegra124/ahb.h                      | 1 +
 arch/arm/include/asm/arch-tegra124/clock.h                    | 1 +
 arch/arm/include/asm/arch-tegra124/flow.h                     | 1 +
 arch/arm/include/asm/arch-tegra124/gp_padctrl.h               | 1 +
 arch/arm/include/asm/arch-tegra124/gpio.h                     | 1 +
 arch/arm/include/asm/arch-tegra124/mc.h                       | 1 +
 arch/arm/include/asm/arch-tegra124/sysctr.h                   | 1 +
 arch/arm/include/asm/arch-tegra20/display.h                   | 1 +
 arch/arm/include/asm/arch-tegra20/flow.h                      | 1 +
 arch/arm/include/asm/arch-tegra20/gp_padctrl.h                | 1 +
 arch/arm/include/asm/arch-tegra20/gpio.h                      | 1 +
 arch/arm/include/asm/arch-tegra20/mc.h                        | 1 +
 arch/arm/include/asm/arch-tegra20/sdram_param.h               | 1 +
 arch/arm/include/asm/arch-tegra210/ahb.h                      | 1 +
 arch/arm/include/asm/arch-tegra210/flow.h                     | 1 +
 arch/arm/include/asm/arch-tegra210/gp_padctrl.h               | 1 +
 arch/arm/include/asm/arch-tegra210/gpio.h                     | 1 +
 arch/arm/include/asm/arch-tegra210/mc.h                       | 1 +
 arch/arm/include/asm/arch-tegra210/sysctr.h                   | 1 +
 arch/arm/include/asm/arch-tegra30/flow.h                      | 1 +
 arch/arm/include/asm/arch-tegra30/gp_padctrl.h                | 1 +
 arch/arm/include/asm/arch-tegra30/gpio.h                      | 1 +
 arch/arm/include/asm/arch-tegra30/mc.h                        | 1 +
 arch/arm/include/asm/arch-vf610/clock.h                       | 1 +
 arch/arm/include/asm/arch-vf610/ddrmc-vf610.h                 | 1 +
 arch/arm/include/asm/arch-vf610/gpio.h                        | 1 +
 arch/arm/include/asm/armv7_mpu.h                              | 1 +
 arch/arm/include/asm/armv7m.h                                 | 1 +
 arch/arm/include/asm/armv8/mmu.h                              | 2 ++
 arch/arm/include/asm/armv8/sec_firmware.h                     | 1 +
 arch/arm/include/asm/bootm.h                                  | 1 +
 arch/arm/include/asm/ehci-omap.h                              | 1 +
 arch/arm/include/asm/handoff.h                                | 1 +
 arch/arm/include/asm/io.h                                     | 1 +
 arch/arm/include/asm/iproc-common/iproc_sdhci.h               | 1 +
 arch/arm/include/asm/kona-common/kona_sdhci.h                 | 1 +
 arch/arm/include/asm/mach-imx/dma.h                           | 1 +
 arch/arm/include/asm/mach-imx/gpio.h                          | 1 +
 arch/arm/include/asm/mach-imx/hab.h                           | 1 +
 arch/arm/include/asm/mach-imx/imx-nandbcb.h                   | 1 +
 arch/arm/include/asm/mach-imx/module_fuse.h                   | 1 +
 arch/arm/include/asm/mach-imx/mxc_i2c.h                       | 1 +
 arch/arm/include/asm/mach-imx/rdc-sema.h                      | 1 +
 arch/arm/include/asm/mach-imx/regs-apbh.h                     | 1 +
 arch/arm/include/asm/mach-imx/regs-bch.h                      | 1 +
 arch/arm/include/asm/mach-imx/regs-gpmi.h                     | 1 +
 arch/arm/include/asm/mach-imx/regs-lcdif.h                    | 1 +
 arch/arm/include/asm/mach-imx/sys_proto.h                     | 1 +
 arch/arm/include/asm/mach-imx/syscounter.h                    | 1 +
 arch/arm/include/asm/mach-imx/video.h                         | 1 +
 arch/arm/include/asm/omap_gpio.h                              | 1 +
 arch/arm/include/asm/omap_i2c.h                               | 1 +
 arch/arm/include/asm/omap_mmc.h                               | 1 +
 arch/arm/include/asm/omap_musb.h                              | 1 +
 arch/arm/include/asm/omap_sec_common.h                        | 1 +
 arch/arm/include/asm/secure.h                                 | 1 +
 arch/arm/include/asm/setjmp.h                                 | 1 +
 arch/arm/include/asm/setup.h                                  | 1 +
 arch/arm/include/asm/system.h                                 | 1 +
 arch/arm/include/asm/ti-common/davinci_nand.h                 | 1 +
 arch/arm/include/asm/ti-common/keystone_nav.h                 | 1 +
 arch/arm/include/asm/ti-common/keystone_net.h                 | 1 +
 arch/arm/include/asm/ti-common/keystone_serdes.h              | 1 +
 arch/arm/include/asm/ti-common/sys_proto.h                    | 1 +
 arch/arm/include/asm/ti-common/ti-edma3.h                     | 2 ++
 arch/arm/include/asm/u-boot-arm.h                             | 1 +
 arch/arm/include/asm/utils.h                                  | 1 +
 arch/arm/lib/bootm-fdt.c                                      | 1 +
 arch/arm/lib/bootm.c                                          | 2 ++
 arch/arm/lib/cache-cp15.c                                     | 2 ++
 arch/arm/lib/cache.c                                          | 2 ++
 arch/arm/lib/cmd_boot.c                                       | 1 +
 arch/arm/lib/eabi_compat.c                                    | 1 +
 arch/arm/lib/gic-v3-its.c                                     | 1 +
 arch/arm/lib/image.c                                          | 2 ++
 arch/arm/lib/interrupts.c                                     | 1 +
 arch/arm/lib/interrupts_64.c                                  | 2 ++
 arch/arm/lib/reloc_aarch64_efi.c                              | 1 +
 arch/arm/lib/reloc_arm_efi.c                                  | 1 +
 arch/arm/lib/reset.c                                          | 1 +
 arch/arm/lib/semihosting.c                                    | 1 +
 arch/arm/lib/spl.c                                            | 2 ++
 arch/arm/lib/zimage.c                                         | 2 ++
 arch/arm/mach-aspeed/ast2500/sdram_ast2500.c                  | 1 +
 arch/arm/mach-aspeed/ast_wdt.c                                | 1 +
 arch/arm/mach-at91/arm920t/clock.c                            | 1 +
 arch/arm/mach-at91/arm920t/reset.c                            | 1 +
 arch/arm/mach-at91/arm920t/timer.c                            | 1 +
 arch/arm/mach-at91/arm926ejs/clock.c                          | 1 +
 arch/arm/mach-at91/arm926ejs/cpu.c                            | 1 +
 arch/arm/mach-at91/arm926ejs/eflash.c                         | 1 +
 arch/arm/mach-at91/arm926ejs/reset.c                          | 1 +
 arch/arm/mach-at91/arm926ejs/timer.c                          | 1 +
 arch/arm/mach-at91/armv7/clock.c                              | 1 +
 arch/arm/mach-at91/armv7/cpu.c                                | 1 +
 arch/arm/mach-at91/armv7/reset.c                              | 1 +
 arch/arm/mach-at91/armv7/timer.c                              | 1 +
 arch/arm/mach-at91/atmel_sfr.c                                | 1 +
 arch/arm/mach-at91/clock.c                                    | 1 +
 arch/arm/mach-at91/include/mach/at91_common.h                 | 1 +
 arch/arm/mach-at91/include/mach/at91_dbu.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_eefc.h                   | 1 +
 arch/arm/mach-at91/include/mach/at91_emac.h                   | 1 +
 arch/arm/mach-at91/include/mach/at91_gpbr.h                   | 1 +
 arch/arm/mach-at91/include/mach/at91_matrix.h                 | 1 +
 arch/arm/mach-at91/include/mach/at91_mc.h                     | 1 +
 arch/arm/mach-at91/include/mach/at91_pdc.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_pio.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_pit.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_rstc.h                   | 1 +
 arch/arm/mach-at91/include/mach/at91_rtt.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_sfr.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_spi.h                    | 1 +
 arch/arm/mach-at91/include/mach/at91_st.h                     | 1 +
 arch/arm/mach-at91/include/mach/at91_tc.h                     | 1 +
 arch/arm/mach-at91/include/mach/at91_wdt.h                    | 2 ++
 arch/arm/mach-at91/include/mach/at91sam9260_matrix.h          | 1 +
 arch/arm/mach-at91/include/mach/at91sam9261_matrix.h          | 1 +
 arch/arm/mach-at91/include/mach/at91sam9263_matrix.h          | 1 +
 arch/arm/mach-at91/include/mach/at91sam9_sdramc.h             | 1 +
 arch/arm/mach-at91/include/mach/at91sam9_smc.h                | 1 +
 arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h          | 1 +
 arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h           | 1 +
 arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h           | 1 +
 arch/arm/mach-at91/include/mach/atmel_mpddrc.h                | 1 +
 arch/arm/mach-at91/include/mach/atmel_pio4.h                  | 1 +
 arch/arm/mach-at91/include/mach/atmel_sdhci.h                 | 1 +
 arch/arm/mach-at91/include/mach/atmel_serial.h                | 1 +
 arch/arm/mach-at91/include/mach/clk.h                         | 1 +
 arch/arm/mach-at91/include/mach/gpio.h                        | 1 +
 arch/arm/mach-at91/include/mach/sama5_matrix.h                | 1 +
 arch/arm/mach-at91/include/mach/sama5d2_smc.h                 | 1 +
 arch/arm/mach-at91/include/mach/sama5d3_smc.h                 | 1 +
 arch/arm/mach-at91/mpddrc.c                                   | 1 +
 arch/arm/mach-at91/spl.c                                      | 1 +
 arch/arm/mach-at91/spl_at91.c                                 | 2 ++
 arch/arm/mach-at91/spl_atmel.c                                | 2 ++
 arch/arm/mach-bcm283x/include/mach/gpio.h                     | 1 +
 arch/arm/mach-bcm283x/include/mach/mbox.h                     | 2 ++
 arch/arm/mach-bcm283x/include/mach/msg.h                      | 1 +
 arch/arm/mach-bcm283x/include/mach/sdhci.h                    | 1 +
 arch/arm/mach-bcm283x/include/mach/wdog.h                     | 1 +
 arch/arm/mach-bcm283x/init.c                                  | 1 +
 arch/arm/mach-bcm283x/mbox.c                                  | 1 +
 arch/arm/mach-bcm283x/msg.c                                   | 1 +
 arch/arm/mach-bcm283x/reset.c                                 | 1 +
 arch/arm/mach-bcmstb/include/mach/timer.h                     | 1 +
 arch/arm/mach-davinci/include/mach/davinci_misc.h             | 1 +
 arch/arm/mach-davinci/include/mach/dm365_lowlevel.h           | 1 +
 arch/arm/mach-davinci/include/mach/sdmmc_defs.h               | 1 +
 arch/arm/mach-davinci/include/mach/timer_defs.h               | 1 +
 arch/arm/mach-davinci/misc.c                                  | 1 +
 arch/arm/mach-davinci/spl.c                                   | 1 +
 arch/arm/mach-davinci/timer.c                                 | 1 +
 arch/arm/mach-exynos/clock.c                                  | 1 +
 arch/arm/mach-exynos/clock_init.h                             | 1 +
 arch/arm/mach-exynos/clock_init_exynos5.c                     | 1 +
 arch/arm/mach-exynos/common_setup.h                           | 1 +
 arch/arm/mach-exynos/dmc_common.c                             | 1 +
 arch/arm/mach-exynos/dmc_init_ddr3.c                          | 1 +
 arch/arm/mach-exynos/exynos5_setup.h                          | 1 +
 arch/arm/mach-exynos/include/mach/mmc.h                       | 1 +
 arch/arm/mach-exynos/include/mach/power.h                     | 1 +
 arch/arm/mach-exynos/include/mach/spl.h                       | 2 ++
 arch/arm/mach-exynos/include/mach/sromc.h                     | 1 +
 arch/arm/mach-exynos/include/mach/sys_proto.h                 | 1 +
 arch/arm/mach-exynos/include/mach/tmu.h                       | 1 +
 arch/arm/mach-exynos/lowlevel_init.c                          | 1 +
 arch/arm/mach-exynos/pinmux.c                                 | 1 +
 arch/arm/mach-exynos/power.c                                  | 1 +
 arch/arm/mach-exynos/soc.c                                    | 1 +
 arch/arm/mach-exynos/spl_boot.c                               | 1 +
 arch/arm/mach-imx/cache.c                                     | 1 +
 arch/arm/mach-imx/cmd_dek.c                                   | 1 +
 arch/arm/mach-imx/cmd_nandbcb.c                               | 2 ++
 arch/arm/mach-imx/cpu.c                                       | 1 +
 arch/arm/mach-imx/ddrmc-vf610-calibration.c                   | 1 +
 arch/arm/mach-imx/hab.c                                       | 1 +
 arch/arm/mach-imx/i2c-mxv7.c                                  | 1 +
 arch/arm/mach-imx/imx8/ahab.c                                 | 2 ++
 arch/arm/mach-imx/imx8/clock.c                                | 1 +
 arch/arm/mach-imx/imx8/cpu.c                                  | 3 +++
 arch/arm/mach-imx/imx8/fdt.c                                  | 1 +
 arch/arm/mach-imx/imx8/image.c                                | 1 +
 arch/arm/mach-imx/imx8/iomux.c                                | 1 +
 arch/arm/mach-imx/imx8/misc.c                                 | 1 +
 arch/arm/mach-imx/imx8/parse-container.c                      | 1 +
 arch/arm/mach-imx/imx8/snvs_security_sc.c                     | 1 +
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                        | 2 ++
 arch/arm/mach-imx/imx8m/clock_imx8mq.c                        | 2 ++
 arch/arm/mach-imx/imx8m/clock_slice.c                         | 3 +++
 arch/arm/mach-imx/imx8m/soc.c                                 | 3 +++
 arch/arm/mach-imx/imx_bootaux.c                               | 1 +
 arch/arm/mach-imx/init.c                                      | 1 +
 arch/arm/mach-imx/iomux-v3.c                                  | 1 +
 arch/arm/mach-imx/mac.c                                       | 1 +
 arch/arm/mach-imx/misc.c                                      | 1 +
 arch/arm/mach-imx/mmc_env.c                                   | 2 ++
 arch/arm/mach-imx/mmdc_size.c                                 | 1 +
 arch/arm/mach-imx/mx5/clock.c                                 | 2 ++
 arch/arm/mach-imx/mx5/soc.c                                   | 2 ++
 arch/arm/mach-imx/mx6/clock.c                                 | 2 ++
 arch/arm/mach-imx/mx6/ddr.c                                   | 1 +
 arch/arm/mach-imx/mx6/module_fuse.c                           | 1 +
 arch/arm/mach-imx/mx6/mp.c                                    | 1 +
 arch/arm/mach-imx/mx6/opos6ul.c                               | 2 ++
 arch/arm/mach-imx/mx6/soc.c                                   | 2 ++
 arch/arm/mach-imx/mx7/clock.c                                 | 1 +
 arch/arm/mach-imx/mx7/clock_slice.c                           | 2 ++
 arch/arm/mach-imx/mx7/psci-mx7.c                              | 1 +
 arch/arm/mach-imx/mx7/snvs.c                                  | 1 +
 arch/arm/mach-imx/mx7/soc.c                                   | 3 +++
 arch/arm/mach-imx/mx7ulp/clock.c                              | 1 +
 arch/arm/mach-imx/mx7ulp/iomux.c                              | 1 +
 arch/arm/mach-imx/mx7ulp/pcc.c                                | 2 ++
 arch/arm/mach-imx/mx7ulp/scg.c                                | 1 +
 arch/arm/mach-imx/mx7ulp/soc.c                                | 2 ++
 arch/arm/mach-imx/rdc-sema.c                                  | 1 +
 arch/arm/mach-imx/spl.c                                       | 2 ++
 arch/arm/mach-imx/spl_imx_romapi.c                            | 1 +
 arch/arm/mach-imx/syscounter.c                                | 1 +
 arch/arm/mach-imx/timer.c                                     | 1 +
 arch/arm/mach-ipq40xx/clock-ipq4019.c                         | 1 +
 arch/arm/mach-ipq40xx/pinctrl-snapdragon.c                    | 1 +
 arch/arm/mach-k3/am6_init.c                                   | 1 +
 arch/arm/mach-k3/common.c                                     | 2 ++
 arch/arm/mach-k3/common.h                                     | 1 +
 arch/arm/mach-k3/include/mach/sys_proto.h                     | 1 +
 arch/arm/mach-k3/j721e_init.c                                 | 1 +
 arch/arm/mach-k3/security.c                                   | 1 +
 arch/arm/mach-k3/sysfw-loader.c                               | 1 +
 arch/arm/mach-keystone/clock.c                                | 2 ++
 arch/arm/mach-keystone/cmd_mon.c                              | 1 +
 arch/arm/mach-keystone/ddr3.c                                 | 1 +
 arch/arm/mach-keystone/ddr3_spd.c                             | 1 +
 arch/arm/mach-keystone/include/mach/clock_defs.h              | 1 +
 arch/arm/mach-keystone/include/mach/ddr3.h                    | 1 +
 arch/arm/mach-keystone/include/mach/hardware-k2g.h            | 1 +
 arch/arm/mach-keystone/include/mach/hardware.h                | 1 +
 arch/arm/mach-keystone/include/mach/mon.h                     | 1 +
 arch/arm/mach-keystone/include/mach/msmc.h                    | 1 +
 arch/arm/mach-keystone/include/mach/mux-k2g.h                 | 1 +
 arch/arm/mach-keystone/include/mach/psc_defs.h                | 1 +
 arch/arm/mach-keystone/init.c                                 | 1 +
 arch/arm/mach-keystone/keystone.c                             | 1 +
 arch/arm/mach-keystone/mon.c                                  | 1 +
 arch/arm/mach-keystone/msmc.c                                 | 1 +
 arch/arm/mach-keystone/psc.c                                  | 1 +
 arch/arm/mach-kirkwood/cache.c                                | 1 +
 arch/arm/mach-kirkwood/cpu.c                                  | 1 +
 arch/arm/mach-kirkwood/include/mach/cpu.h                     | 1 +
 arch/arm/mach-kirkwood/mpp.c                                  | 1 +
 arch/arm/mach-lpc32xx/clk.c                                   | 1 +
 arch/arm/mach-lpc32xx/cpu.c                                   | 1 +
 arch/arm/mach-lpc32xx/devices.c                               | 1 +
 arch/arm/mach-lpc32xx/dram.c                                  | 1 +
 arch/arm/mach-lpc32xx/timer.c                                 | 1 +
 arch/arm/mach-mediatek/mt7622/init.c                          | 1 +
 arch/arm/mach-mediatek/mt7623/init.c                          | 2 ++
 arch/arm/mach-mediatek/mt7623/preloader.h                     | 1 +
 arch/arm/mach-mediatek/mt7629/init.c                          | 2 ++
 arch/arm/mach-mediatek/mt8512/init.c                          | 1 +
 arch/arm/mach-mediatek/mt8516/init.c                          | 1 +
 arch/arm/mach-mediatek/mt8518/init.c                          | 1 +
 arch/arm/mach-mediatek/spl.c                                  | 1 +
 arch/arm/mach-meson/board-axg.c                               | 1 +
 arch/arm/mach-meson/board-common.c                            | 2 ++
 arch/arm/mach-meson/board-g12a.c                              | 1 +
 arch/arm/mach-meson/board-gx.c                                | 1 +
 arch/arm/mach-meson/board-info.c                              | 1 +
 arch/arm/mach-meson/sm.c                                      | 1 +
 arch/arm/mach-mvebu/arm64-common.c                            | 2 ++
 arch/arm/mach-mvebu/armada3700/cpu.c                          | 1 +
 arch/arm/mach-mvebu/armada8k/cpu.c                            | 1 +
 arch/arm/mach-mvebu/cpu.c                                     | 2 ++
 arch/arm/mach-mvebu/dram.c                                    | 1 +
 arch/arm/mach-mvebu/efuse.c                                   | 1 +
 arch/arm/mach-mvebu/gpio.c                                    | 1 +
 arch/arm/mach-mvebu/include/mach/cpu.h                        | 1 +
 arch/arm/mach-mvebu/include/mach/efuse.h                      | 1 +
 arch/arm/mach-mvebu/mbus.c                                    | 2 ++
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c                    | 2 ++
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c     | 1 +
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c         | 1 +
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.c                    | 1 +
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.h                    | 1 +
 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c                 | 1 +
 arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c           | 2 ++
 arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c          | 1 +
 arch/arm/mach-mvebu/spl.c                                     | 1 +
 arch/arm/mach-nexell/clock.c                                  | 2 ++
 arch/arm/mach-nexell/cmd_boot_linux.c                         | 1 +
 arch/arm/mach-nexell/include/mach/display.h                   | 1 +
 arch/arm/mach-nexell/include/mach/display_dev.h               | 1 +
 arch/arm/mach-nexell/include/mach/mipi_display.h              | 1 +
 arch/arm/mach-nexell/include/mach/reset.h                     | 1 +
 arch/arm/mach-nexell/include/mach/sec_reg.h                   | 1 +
 arch/arm/mach-nexell/include/mach/tieoff.h                    | 1 +
 arch/arm/mach-nexell/nx_sec_reg.c                             | 1 +
 arch/arm/mach-nexell/reset.c                                  | 1 +
 arch/arm/mach-nexell/tieoff.c                                 | 2 ++
 arch/arm/mach-nexell/timer.c                                  | 2 ++
 arch/arm/mach-omap2/abb.c                                     | 2 ++
 arch/arm/mach-omap2/am33xx/board.c                            | 2 ++
 arch/arm/mach-omap2/am33xx/clk_synthesizer.c                  | 1 +
 arch/arm/mach-omap2/am33xx/clock.c                            | 2 ++
 arch/arm/mach-omap2/am33xx/clock_am33xx.c                     | 2 ++
 arch/arm/mach-omap2/am33xx/clock_am43xx.c                     | 1 +
 arch/arm/mach-omap2/am33xx/clock_ti814x.c                     | 1 +
 arch/arm/mach-omap2/am33xx/clock_ti816x.c                     | 1 +
 arch/arm/mach-omap2/am33xx/ddr.c                              | 1 +
 arch/arm/mach-omap2/am33xx/emif4.c                            | 1 +
 arch/arm/mach-omap2/am33xx/mux.c                              | 1 +
 arch/arm/mach-omap2/am33xx/sys_info.c                         | 1 +
 arch/arm/mach-omap2/boot-common.c                             | 2 ++
 arch/arm/mach-omap2/clocks-common.c                           | 2 ++
 arch/arm/mach-omap2/emif-common.c                             | 2 ++
 arch/arm/mach-omap2/fdt-common.c                              | 1 +
 arch/arm/mach-omap2/hwinit-common.c                           | 2 ++
 arch/arm/mach-omap2/mem-common.c                              | 1 +
 arch/arm/mach-omap2/omap-cache.c                              | 1 +
 arch/arm/mach-omap2/omap3/am35x_musb.c                        | 1 +
 arch/arm/mach-omap2/omap3/board.c                             | 2 ++
 arch/arm/mach-omap2/omap3/boot.c                              | 1 +
 arch/arm/mach-omap2/omap3/clock.c                             | 1 +
 arch/arm/mach-omap2/omap3/emac.c                              | 1 +
 arch/arm/mach-omap2/omap3/emif4.c                             | 1 +
 arch/arm/mach-omap2/omap3/sdrc.c                              | 1 +
 arch/arm/mach-omap2/omap3/sys_info.c                          | 2 ++
 arch/arm/mach-omap2/omap4/boot.c                              | 1 +
 arch/arm/mach-omap2/omap4/emif.c                              | 1 +
 arch/arm/mach-omap2/omap4/hw_data.c                           | 1 +
 arch/arm/mach-omap2/omap4/hwinit.c                            | 1 +
 arch/arm/mach-omap2/omap4/sdram_elpida.c                      | 2 ++
 arch/arm/mach-omap2/omap5/abb.c                               | 1 +
 arch/arm/mach-omap2/omap5/boot.c                              | 1 +
 arch/arm/mach-omap2/omap5/dra7xx_iodelay.c                    | 1 +
 arch/arm/mach-omap2/omap5/emif.c                              | 1 +
 arch/arm/mach-omap2/omap5/fdt.c                               | 1 +
 arch/arm/mach-omap2/omap5/hw_data.c                           | 2 ++
 arch/arm/mach-omap2/omap5/hwinit.c                            | 2 ++
 arch/arm/mach-omap2/omap5/prcm-regs.c                         | 1 +
 arch/arm/mach-omap2/omap5/sdram.c                             | 2 ++
 arch/arm/mach-omap2/pipe3-phy.c                               | 2 ++
 arch/arm/mach-omap2/pipe3-phy.h                               | 2 ++
 arch/arm/mach-omap2/reset.c                                   | 2 ++
 arch/arm/mach-omap2/sata.c                                    | 2 ++
 arch/arm/mach-omap2/sec-common.c                              | 1 +
 arch/arm/mach-omap2/sysinfo-common.c                          | 1 +
 arch/arm/mach-omap2/timer.c                                   | 1 +
 arch/arm/mach-omap2/utils.c                                   | 2 ++
 arch/arm/mach-omap2/vc.c                                      | 1 +
 arch/arm/mach-orion5x/cpu.c                                   | 1 +
 arch/arm/mach-orion5x/dram.c                                  | 1 +
 arch/arm/mach-orion5x/include/mach/cpu.h                      | 1 +
 arch/arm/mach-orion5x/timer.c                                 | 1 +
 arch/arm/mach-owl/soc.c                                       | 1 +
 arch/arm/mach-rmobile/cpu_info-r8a7740.c                      | 1 +
 arch/arm/mach-rmobile/cpu_info-rcar.c                         | 1 +
 arch/arm/mach-rmobile/cpu_info-sh73a0.c                       | 1 +
 arch/arm/mach-rmobile/cpu_info.c                              | 1 +
 arch/arm/mach-rmobile/include/mach/ehci-rmobile.h             | 1 +
 arch/arm/mach-rmobile/include/mach/rcar-mstp.h                | 1 +
 arch/arm/mach-rmobile/include/mach/rmobile.h                  | 1 +
 arch/arm/mach-rmobile/timer.c                                 | 1 +
 arch/arm/mach-rockchip/board.c                                | 2 ++
 arch/arm/mach-rockchip/boot_mode.c                            | 1 +
 arch/arm/mach-rockchip/bootrom.c                              | 1 +
 arch/arm/mach-rockchip/misc.c                                 | 1 +
 arch/arm/mach-rockchip/px30-board-tpl.c                       | 1 +
 arch/arm/mach-rockchip/px30/px30.c                            | 1 +
 arch/arm/mach-rockchip/px30/syscon_px30.c                     | 1 +
 arch/arm/mach-rockchip/rk3036-board-spl.c                     | 1 +
 arch/arm/mach-rockchip/rk3036/sdram_rk3036.c                  | 1 +
 arch/arm/mach-rockchip/rk3188/rk3188.c                        | 1 +
 arch/arm/mach-rockchip/rk3188/syscon_rk3188.c                 | 1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c                        | 2 ++
 arch/arm/mach-rockchip/rk3288/syscon_rk3288.c                 | 1 +
 arch/arm/mach-rockchip/rk3308/rk3308.c                        | 2 ++
 arch/arm/mach-rockchip/rk3368/rk3368.c                        | 1 +
 arch/arm/mach-rockchip/rk3368/syscon_rk3368.c                 | 1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c                        | 2 ++
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c                 | 1 +
 arch/arm/mach-rockchip/sdram.c                                | 1 +
 arch/arm/mach-rockchip/spl-boot-order.c                       | 2 ++
 arch/arm/mach-rockchip/spl.c                                  | 2 ++
 arch/arm/mach-rockchip/tpl.c                                  | 2 ++
 arch/arm/mach-s5pc1xx/clock.c                                 | 1 +
 arch/arm/mach-s5pc1xx/include/mach/gpio.h                     | 1 +
 arch/arm/mach-s5pc1xx/include/mach/mmc.h                      | 1 +
 arch/arm/mach-s5pc1xx/include/mach/sromc.h                    | 1 +
 arch/arm/mach-s5pc1xx/include/mach/sys_proto.h                | 1 +
 arch/arm/mach-snapdragon/clock-apq8016.c                      | 1 +
 arch/arm/mach-snapdragon/clock-apq8096.c                      | 1 +
 arch/arm/mach-snapdragon/clock-snapdragon.c                   | 1 +
 arch/arm/mach-snapdragon/clock-snapdragon.h                   | 1 +
 arch/arm/mach-snapdragon/dram.c                               | 2 ++
 arch/arm/mach-snapdragon/include/mach/misc.h                  | 1 +
 arch/arm/mach-snapdragon/misc.c                               | 1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c                 | 1 +
 arch/arm/mach-socfpga/clock_manager.c                         | 1 +
 arch/arm/mach-socfpga/clock_manager_agilex.c                  | 1 +
 arch/arm/mach-socfpga/clock_manager_arria10.c                 | 1 +
 arch/arm/mach-socfpga/clock_manager_gen5.c                    | 1 +
 arch/arm/mach-socfpga/clock_manager_s10.c                     | 1 +
 arch/arm/mach-socfpga/firewall.c                              | 1 +
 arch/arm/mach-socfpga/freeze_controller.c                     | 1 +
 arch/arm/mach-socfpga/include/mach/clock_manager.h            | 4 ++--
 arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h       | 1 +
 arch/arm/mach-socfpga/include/mach/clock_manager_s10.h        | 1 +
 arch/arm/mach-socfpga/include/mach/firewall.h                 | 1 +
 arch/arm/mach-socfpga/include/mach/fpga_manager.h             | 1 +
 arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h     | 1 +
 arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h        | 1 +
 arch/arm/mach-socfpga/include/mach/freeze_controller.h        | 1 +
 arch/arm/mach-socfpga/include/mach/mailbox_s10.h              | 1 +
 arch/arm/mach-socfpga/include/mach/misc.h                     | 1 +
 arch/arm/mach-socfpga/include/mach/nic301.h                   | 1 +
 arch/arm/mach-socfpga/include/mach/reset_manager.h            | 1 +
 arch/arm/mach-socfpga/include/mach/scan_manager.h             | 1 +
 arch/arm/mach-socfpga/include/mach/scu.h                      | 1 +
 arch/arm/mach-socfpga/include/mach/sdram_arria10.h            | 1 +
 arch/arm/mach-socfpga/include/mach/sdram_gen5.h               | 1 +
 arch/arm/mach-socfpga/include/mach/system_manager.h           | 1 +
 arch/arm/mach-socfpga/include/mach/system_manager_gen5.h      | 1 +
 arch/arm/mach-socfpga/include/mach/system_manager_soc64.h     | 1 +
 arch/arm/mach-socfpga/include/mach/timer.h                    | 1 +
 arch/arm/mach-socfpga/mailbox_s10.c                           | 1 +
 arch/arm/mach-socfpga/misc.c                                  | 1 +
 arch/arm/mach-socfpga/misc_arria10.c                          | 1 +
 arch/arm/mach-socfpga/misc_gen5.c                             | 2 ++
 arch/arm/mach-socfpga/misc_s10.c                              | 1 +
 arch/arm/mach-socfpga/pinmux_arria10.c                        | 1 +
 arch/arm/mach-socfpga/reset_manager_arria10.c                 | 1 +
 arch/arm/mach-socfpga/reset_manager_gen5.c                    | 1 +
 arch/arm/mach-socfpga/reset_manager_s10.c                     | 1 +
 arch/arm/mach-socfpga/scan_manager.c                          | 1 +
 arch/arm/mach-socfpga/spl_a10.c                               | 1 +
 arch/arm/mach-socfpga/spl_agilex.c                            | 1 +
 arch/arm/mach-socfpga/spl_gen5.c                              | 1 +
 arch/arm/mach-socfpga/spl_s10.c                               | 1 +
 arch/arm/mach-socfpga/system_manager_gen5.c                   | 1 +
 arch/arm/mach-socfpga/system_manager_s10.c                    | 1 +
 arch/arm/mach-socfpga/wrap_pinmux_config.c                    | 1 +
 arch/arm/mach-socfpga/wrap_pinmux_config_s10.c                | 1 +
 arch/arm/mach-socfpga/wrap_pll_config_s10.c                   | 1 +
 arch/arm/mach-socfpga/wrap_sdram_config.c                     | 1 +
 arch/arm/mach-stm32mp/bsec.c                                  | 1 +
 arch/arm/mach-stm32mp/cmd_stm32key.c                          | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c           | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c               | 2 ++
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h               | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c        | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c           | 1 +
 arch/arm/mach-stm32mp/cpu.c                                   | 2 ++
 arch/arm/mach-stm32mp/dram_init.c                             | 1 +
 arch/arm/mach-stm32mp/fdt.c                                   | 2 ++
 arch/arm/mach-stm32mp/include/mach/gpio.h                     | 1 +
 arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h             | 1 +
 arch/arm/mach-stm32mp/include/mach/sys_proto.h                | 1 +
 arch/arm/mach-stm32mp/psci.c                                  | 1 +
 arch/arm/mach-stm32mp/pwr_regulator.c                         | 2 ++
 arch/arm/mach-stm32mp/spl.c                                   | 2 ++
 arch/arm/mach-sunxi/board.c                                   | 1 +
 arch/arm/mach-sunxi/clock.c                                   | 2 ++
 arch/arm/mach-sunxi/clock_sun4i.c                             | 1 +
 arch/arm/mach-sunxi/clock_sun50i_h6.c                         | 1 +
 arch/arm/mach-sunxi/clock_sun6i.c                             | 1 +
 arch/arm/mach-sunxi/clock_sun8i_a83t.c                        | 1 +
 arch/arm/mach-sunxi/clock_sun9i.c                             | 1 +
 arch/arm/mach-sunxi/cpu_info.c                                | 1 +
 arch/arm/mach-sunxi/dram_helpers.c                            | 1 +
 arch/arm/mach-sunxi/dram_sun4i.c                              | 2 ++
 arch/arm/mach-sunxi/dram_sun50i_h6.c                          | 1 +
 arch/arm/mach-sunxi/dram_sun6i.c                              | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a23.c                          | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a33.c                          | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a83t.c                         | 1 +
 arch/arm/mach-sunxi/dram_sun9i.c                              | 1 +
 arch/arm/mach-sunxi/dram_sunxi_dw.c                           | 2 ++
 arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c                   | 1 +
 arch/arm/mach-sunxi/dram_timings/ddr3_1333.c                  | 1 +
 arch/arm/mach-sunxi/dram_timings/h6_ddr3_1333.c               | 1 +
 arch/arm/mach-sunxi/dram_timings/h6_lpddr3.c                  | 1 +
 arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c               | 1 +
 arch/arm/mach-sunxi/p2wi.c                                    | 1 +
 arch/arm/mach-sunxi/pinmux.c                                  | 1 +
 arch/arm/mach-sunxi/pmic_bus.c                                | 1 +
 arch/arm/mach-sunxi/prcm.c                                    | 1 +
 arch/arm/mach-sunxi/rsb.c                                     | 1 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c                           | 1 +
 arch/arm/mach-tegra/ap.c                                      | 1 +
 arch/arm/mach-tegra/board.c                                   | 2 ++
 arch/arm/mach-tegra/board2.c                                  | 2 ++
 arch/arm/mach-tegra/cache.c                                   | 1 +
 arch/arm/mach-tegra/cboot.c                                   | 2 ++
 arch/arm/mach-tegra/clock.c                                   | 3 +++
 arch/arm/mach-tegra/cpu.c                                     | 1 +
 arch/arm/mach-tegra/ivc.c                                     | 1 +
 arch/arm/mach-tegra/pinmux-common.c                           | 1 +
 arch/arm/mach-tegra/pmc.c                                     | 1 +
 arch/arm/mach-tegra/spl.c                                     | 1 +
 arch/arm/mach-tegra/tegra114/clock.c                          | 1 +
 arch/arm/mach-tegra/tegra114/cpu.c                            | 1 +
 arch/arm/mach-tegra/tegra124/clock.c                          | 1 +
 arch/arm/mach-tegra/tegra124/cpu.c                            | 1 +
 arch/arm/mach-tegra/tegra124/psci.c                           | 1 +
 arch/arm/mach-tegra/tegra124/xusb-padctl.c                    | 1 +
 arch/arm/mach-tegra/tegra20/clock.c                           | 1 +
 arch/arm/mach-tegra/tegra20/cpu.c                             | 1 +
 arch/arm/mach-tegra/tegra20/crypto.c                          | 1 +
 arch/arm/mach-tegra/tegra20/crypto.h                          | 1 +
 arch/arm/mach-tegra/tegra20/emc.c                             | 1 +
 arch/arm/mach-tegra/tegra20/warmboot.c                        | 1 +
 arch/arm/mach-tegra/tegra20/warmboot_avp.c                    | 1 +
 arch/arm/mach-tegra/tegra210/clock.c                          | 1 +
 arch/arm/mach-tegra/tegra210/xusb-padctl.c                    | 1 +
 arch/arm/mach-tegra/tegra30/clock.c                           | 1 +
 arch/arm/mach-tegra/tegra30/cpu.c                             | 1 +
 arch/arm/mach-tegra/xusb-padctl-common.c                      | 1 +
 arch/arm/mach-tegra/xusb-padctl-common.h                      | 1 +
 arch/arm/mach-u8500/cpuinfo.c                                 | 1 +
 arch/arm/mach-uniphier/arm32/cache-uniphier.c                 | 2 ++
 arch/arm/mach-uniphier/arm32/psci.c                           | 1 +
 arch/arm/mach-uniphier/base-address.c                         | 1 +
 arch/arm/mach-uniphier/board_init.c                           | 1 +
 arch/arm/mach-uniphier/boot-device/boot-device-ld11.c         | 1 +
 arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c         | 1 +
 arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c         | 1 +
 arch/arm/mach-uniphier/boot-device/boot-device.c              | 2 ++
 arch/arm/mach-uniphier/boot-device/boot-device.h              | 1 +
 arch/arm/mach-uniphier/clk/clk-dram-ld4.c                     | 1 +
 arch/arm/mach-uniphier/clk/clk-dram-pro5.c                    | 1 +
 arch/arm/mach-uniphier/clk/clk-dram-pxs2.c                    | 1 +
 arch/arm/mach-uniphier/clk/clk-early-ld4.c                    | 1 +
 arch/arm/mach-uniphier/clk/clk-ld11.c                         | 1 +
 arch/arm/mach-uniphier/clk/clk-ld20.c                         | 1 +
 arch/arm/mach-uniphier/clk/clk-pro4.c                         | 1 +
 arch/arm/mach-uniphier/clk/clk-pro5.c                         | 1 +
 arch/arm/mach-uniphier/clk/clk-pxs2.c                         | 1 +
 arch/arm/mach-uniphier/clk/clk-pxs3.c                         | 1 +
 arch/arm/mach-uniphier/clk/dpll-ld4.c                         | 1 +
 arch/arm/mach-uniphier/clk/dpll-pro4.c                        | 1 +
 arch/arm/mach-uniphier/clk/dpll-sld8.c                        | 1 +
 arch/arm/mach-uniphier/clk/dpll-tail.c                        | 1 +
 arch/arm/mach-uniphier/clk/pll-base-ld20.c                    | 2 ++
 arch/arm/mach-uniphier/clk/pll-ld4.c                          | 1 +
 arch/arm/mach-uniphier/clk/pll-pro4.c                         | 1 +
 arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c           | 1 +
 arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c           | 1 +
 arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c           | 1 +
 arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c           | 1 +
 arch/arm/mach-uniphier/debug-uart/debug-uart.c                | 2 ++
 arch/arm/mach-uniphier/debug.h                                | 1 +
 arch/arm/mach-uniphier/dram/cmd_ddrmphy.c                     | 2 ++
 arch/arm/mach-uniphier/dram/cmd_ddrphy.c                      | 2 ++
 arch/arm/mach-uniphier/dram/ddrphy-ld4.c                      | 2 ++
 arch/arm/mach-uniphier/dram/ddrphy-training.c                 | 2 ++
 arch/arm/mach-uniphier/dram/umc-ld4.c                         | 2 ++
 arch/arm/mach-uniphier/dram/umc-pro4.c                        | 2 ++
 arch/arm/mach-uniphier/dram/umc-pxs2.c                        | 2 ++
 arch/arm/mach-uniphier/dram/umc-sld8.c                        | 2 ++
 arch/arm/mach-uniphier/dram_init.c                            | 2 ++
 arch/arm/mach-uniphier/memconf.c                              | 1 +
 arch/arm/mach-uniphier/micro-support-card.c                   | 2 ++
 arch/arm/mach-uniphier/mmc-boot-mode.c                        | 1 +
 arch/arm/mach-uniphier/reset.c                                | 1 +
 arch/arm/mach-uniphier/sc-regs.h                              | 1 +
 arch/arm/mach-uniphier/sc64-regs.h                            | 1 +
 arch/arm/mach-uniphier/sg-regs.h                              | 1 +
 arch/arm/mach-versal/include/mach/hardware.h                  | 1 +
 arch/arm/mach-versal/include/mach/sys_proto.h                 | 1 +
 arch/arm/mach-versal/mp.c                                     | 1 +
 arch/arm/mach-versatile/timer.c                               | 1 +
 arch/arm/mach-zynq/clk.c                                      | 1 +
 arch/arm/mach-zynq/cpu.c                                      | 1 +
 arch/arm/mach-zynq/ddrc.c                                     | 1 +
 arch/arm/mach-zynq/include/mach/hardware.h                    | 1 +
 arch/arm/mach-zynq/include/mach/sys_proto.h                   | 1 +
 arch/arm/mach-zynq/ps7_spl_init.c                             | 1 +
 arch/arm/mach-zynq/slcr.c                                     | 1 +
 arch/arm/mach-zynq/spl.c                                      | 1 +
 arch/arm/mach-zynq/timer.c                                    | 1 +
 arch/arm/mach-zynqmp-r5/cpu.c                                 | 1 +
 arch/arm/mach-zynqmp/clk.c                                    | 1 +
 arch/arm/mach-zynqmp/cpu.c                                    | 1 +
 arch/arm/mach-zynqmp/handoff.c                                | 1 +
 arch/arm/mach-zynqmp/include/mach/hardware.h                  | 1 +
 arch/arm/mach-zynqmp/include/mach/sys_proto.h                 | 1 +
 arch/arm/mach-zynqmp/mp.c                                     | 1 +
 arch/arm/mach-zynqmp/psu_spl_init.c                           | 2 ++
 arch/arm/mach-zynqmp/spl.c                                    | 1 +
 arch/m68k/cpu/mcf5227x/cpu.c                                  | 1 +
 arch/m68k/cpu/mcf5227x/speed.c                                | 1 +
 arch/m68k/cpu/mcf523x/cpu.c                                   | 1 +
 arch/m68k/cpu/mcf52x2/cpu.c                                   | 1 +
 arch/m68k/cpu/mcf52x2/cpu.h                                   | 1 +
 arch/m68k/cpu/mcf52x2/cpu_init.c                              | 1 +
 arch/m68k/cpu/mcf532x/cpu.c                                   | 1 +
 arch/m68k/cpu/mcf532x/cpu_init.c                              | 1 +
 arch/m68k/cpu/mcf532x/speed.c                                 | 1 +
 arch/m68k/cpu/mcf5445x/cpu.c                                  | 1 +
 arch/m68k/cpu/mcf5445x/cpu_init.c                             | 1 +
 arch/m68k/cpu/mcf5445x/pci.c                                  | 1 +
 arch/m68k/cpu/mcf5445x/speed.c                                | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu.c                                | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu_init.c                           | 1 +
 arch/m68k/cpu/mcf547x_8x/pci.c                                | 1 +
 arch/m68k/cpu/mcf547x_8x/slicetimer.c                         | 1 +
 arch/m68k/include/asm/coldfire/ata.h                          | 1 +
 arch/m68k/include/asm/coldfire/crossbar.h                     | 1 +
 arch/m68k/include/asm/coldfire/dspi.h                         | 1 +
 arch/m68k/include/asm/coldfire/edma.h                         | 1 +
 arch/m68k/include/asm/coldfire/eport.h                        | 1 +
 arch/m68k/include/asm/coldfire/flexbus.h                      | 1 +
 arch/m68k/include/asm/coldfire/flexcan.h                      | 1 +
 arch/m68k/include/asm/coldfire/intctrl.h                      | 1 +
 arch/m68k/include/asm/coldfire/lcd.h                          | 1 +
 arch/m68k/include/asm/coldfire/mdha.h                         | 1 +
 arch/m68k/include/asm/coldfire/pwm.h                          | 1 +
 arch/m68k/include/asm/coldfire/qspi.h                         | 1 +
 arch/m68k/include/asm/coldfire/rng.h                          | 1 +
 arch/m68k/include/asm/coldfire/skha.h                         | 1 +
 arch/m68k/include/asm/coldfire/ssi.h                          | 1 +
 arch/m68k/include/asm/fec.h                                   | 1 +
 arch/m68k/include/asm/fsl_mcdmafec.h                          | 1 +
 arch/m68k/include/asm/immap_520x.h                            | 1 +
 arch/m68k/include/asm/immap_5227x.h                           | 1 +
 arch/m68k/include/asm/immap_5235.h                            | 1 +
 arch/m68k/include/asm/immap_5272.h                            | 1 +
 arch/m68k/include/asm/immap_5275.h                            | 1 +
 arch/m68k/include/asm/immap_5282.h                            | 1 +
 arch/m68k/include/asm/immap_5301x.h                           | 1 +
 arch/m68k/include/asm/immap_5307.h                            | 1 +
 arch/m68k/include/asm/immap_5329.h                            | 1 +
 arch/m68k/include/asm/immap_5441x.h                           | 1 +
 arch/m68k/include/asm/immap_5445x.h                           | 1 +
 arch/m68k/include/asm/immap_547x_8x.h                         | 1 +
 arch/m68k/include/asm/io.h                                    | 1 +
 arch/m68k/include/asm/m5282.h                                 | 1 +
 arch/m68k/include/asm/ptrace.h                                | 1 +
 arch/m68k/include/asm/rtc.h                                   | 1 +
 arch/m68k/include/asm/timer.h                                 | 1 +
 arch/m68k/include/asm/uart.h                                  | 1 +
 arch/m68k/lib/bdinfo.c                                        | 1 +
 arch/m68k/lib/bootm.c                                         | 1 +
 arch/m68k/lib/cache.c                                         | 2 ++
 arch/m68k/lib/fec.c                                           | 1 +
 arch/m68k/lib/time.c                                          | 1 +
 arch/m68k/lib/traps.c                                         | 1 +
 arch/microblaze/cpu/cache.c                                   | 1 +
 arch/microblaze/cpu/interrupts.c                              | 1 +
 arch/microblaze/cpu/spl.c                                     | 1 +
 arch/microblaze/cpu/timer.c                                   | 1 +
 arch/microblaze/lib/bootm.c                                   | 1 +
 arch/mips/cpu/cpu.c                                           | 1 +
 arch/mips/cpu/time.c                                          | 1 +
 arch/mips/include/asm/cacheops.h                              | 1 +
 arch/mips/include/asm/io.h                                    | 1 +
 arch/mips/include/asm/mach-generic/ioremap.h                  | 1 +
 arch/mips/include/asm/mipsregs.h                              | 1 +
 arch/mips/include/asm/pgtable-bits.h                          | 1 +
 arch/mips/include/asm/sections.h                              | 1 +
 arch/mips/lib/boot.c                                          | 1 +
 arch/mips/lib/bootm.c                                         | 1 +
 arch/mips/lib/cache.c                                         | 3 +++
 arch/mips/lib/reloc.c                                         | 1 +
 arch/mips/lib/traps.c                                         | 1 +
 arch/mips/mach-ath79/ar933x/clk.c                             | 2 ++
 arch/mips/mach-ath79/ar933x/ddr.c                             | 1 +
 arch/mips/mach-ath79/ar934x/clk.c                             | 2 ++
 arch/mips/mach-ath79/ar934x/ddr.c                             | 1 +
 arch/mips/mach-ath79/cpu.c                                    | 1 +
 arch/mips/mach-ath79/qca953x/clk.c                            | 2 ++
 arch/mips/mach-ath79/qca953x/ddr.c                            | 1 +
 arch/mips/mach-ath79/qca956x/clk.c                            | 2 ++
 arch/mips/mach-ath79/qca956x/ddr.c                            | 1 +
 arch/mips/mach-ath79/reset.c                                  | 1 +
 arch/mips/mach-bmips/include/ioremap.h                        | 1 +
 arch/mips/mach-jz47xx/include/mach/jz4780.h                   | 2 ++
 arch/mips/mach-jz47xx/include/mach/jz4780_dram.h              | 1 +
 arch/mips/mach-jz47xx/jz4780/gpio.c                           | 1 +
 arch/mips/mach-jz47xx/jz4780/jz4780.c                         | 1 +
 arch/mips/mach-jz47xx/jz4780/pll.c                            | 2 ++
 arch/mips/mach-jz47xx/jz4780/reset.c                          | 1 +
 arch/mips/mach-jz47xx/jz4780/sdram.c                          | 2 ++
 arch/mips/mach-jz47xx/jz4780/timer.c                          | 2 ++
 arch/mips/mach-mscc/gpio.c                                    | 1 +
 arch/mips/mach-mscc/include/ioremap.h                         | 1 +
 arch/mips/mach-mscc/include/mach/common.h                     | 1 +
 arch/mips/mach-mscc/include/mach/ddr.h                        | 2 ++
 arch/mips/mach-mscc/include/mach/jr2/jr2.h                    | 1 +
 arch/mips/mach-mscc/include/mach/luton/luton.h                | 1 +
 arch/mips/mach-mscc/include/mach/ocelot/ocelot.h              | 1 +
 arch/mips/mach-mscc/include/mach/serval/serval.h              | 1 +
 arch/mips/mach-mscc/include/mach/servalt/servalt.h            | 1 +
 arch/mips/mach-mscc/include/mach/tlb.h                        | 1 +
 arch/mips/mach-mscc/phy.c                                     | 1 +
 arch/mips/mach-mscc/reset.c                                   | 1 +
 arch/mips/mach-mtmips/ddr_cal.c                               | 3 +++
 arch/mips/mach-mtmips/ddr_init.c                              | 2 ++
 arch/mips/mach-mtmips/include/mach/ddr.h                      | 1 +
 arch/mips/mach-mtmips/mt7628/ddr.c                            | 2 ++
 arch/mips/mach-mtmips/mt7628/init.c                           | 1 +
 arch/mips/mach-mtmips/mt7628/serial.c                         | 1 +
 arch/mips/mach-mtmips/spl.c                                   | 1 +
 arch/mips/mach-octeon/cache.c                                 | 1 +
 arch/mips/mach-octeon/clock.c                                 | 1 +
 arch/mips/mach-octeon/cpu.c                                   | 1 +
 arch/mips/mach-octeon/dram.c                                  | 1 +
 arch/mips/mach-octeon/include/ioremap.h                       | 1 +
 arch/mips/mach-pic32/cpu.c                                    | 2 ++
 arch/mips/mach-pic32/include/mach/ddr.h                       | 1 +
 arch/mips/mach-pic32/include/mach/pic32.h                     | 2 ++
 arch/mips/mach-pic32/reset.c                                  | 1 +
 arch/nds32/cpu/n1213/ag101/timer.c                            | 1 +
 arch/nds32/include/asm/bootm.h                                | 1 +
 arch/nds32/include/asm/io.h                                   | 1 +
 arch/nds32/include/asm/setup.h                                | 1 +
 arch/nds32/lib/boot.c                                         | 1 +
 arch/nds32/lib/bootm.c                                        | 1 +
 arch/nios2/cpu/interrupts.c                                   | 1 +
 arch/nios2/include/asm/dma-mapping.h                          | 1 +
 arch/nios2/include/asm/global_data.h                          | 1 +
 arch/nios2/include/asm/io.h                                   | 1 +
 arch/nios2/lib/bootm.c                                        | 1 +
 arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h                    | 1 +
 arch/powerpc/cpu/mpc83xx/cpu.c                                | 1 +
 arch/powerpc/cpu/mpc83xx/cpu_init.c                           | 1 +
 arch/powerpc/cpu/mpc83xx/ecc.c                                | 2 ++
 arch/powerpc/cpu/mpc83xx/fdt.c                                | 1 +
 arch/powerpc/cpu/mpc83xx/initreg/initreg.h                    | 1 +
 arch/powerpc/cpu/mpc83xx/interrupts.c                         | 1 +
 arch/powerpc/cpu/mpc83xx/pci.c                                | 1 +
 arch/powerpc/cpu/mpc83xx/pcie.c                               | 1 +
 arch/powerpc/cpu/mpc83xx/qe_io.c                              | 1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c                          | 1 +
 arch/powerpc/cpu/mpc83xx/speed.c                              | 1 +
 arch/powerpc/cpu/mpc83xx/spl_minimal.c                        | 1 +
 arch/powerpc/cpu/mpc83xx/traps.c                              | 1 +
 arch/powerpc/cpu/mpc85xx/b4860_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/c29x_serdes.c                        | 1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c                         | 2 ++
 arch/powerpc/cpu/mpc85xx/commproc.c                           | 1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                                | 2 ++
 arch/powerpc/cpu/mpc85xx/cpu_init.c                           | 2 ++
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/ether_fcc.c                          | 1 +
 arch/powerpc/cpu/mpc85xx/fdt.c                                | 2 ++
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c                | 2 ++
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h                | 1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c                 | 1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h                 | 1 +
 arch/powerpc/cpu/mpc85xx/interrupts.c                         | 2 ++
 arch/powerpc/cpu/mpc85xx/liodn.c                              | 1 +
 arch/powerpc/cpu/mpc85xx/mp.c                                 | 1 +
 arch/powerpc/cpu/mpc85xx/mp.h                                 | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/p1010_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p1021_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p1022_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p1023_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p2020_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p2041_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p3041_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p4080_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p5020_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/p5040_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/pci.c                                | 1 +
 arch/powerpc/cpu/mpc85xx/portals.c                            | 1 +
 arch/powerpc/cpu/mpc85xx/qe_io.c                              | 1 +
 arch/powerpc/cpu/mpc85xx/serial_scc.c                         | 2 ++
 arch/powerpc/cpu/mpc85xx/speed.c                              | 1 +
 arch/powerpc/cpu/mpc85xx/spl_minimal.c                        | 1 +
 arch/powerpc/cpu/mpc85xx/t1024_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/t1040_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/t2080_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/t4240_serdes.c                       | 1 +
 arch/powerpc/cpu/mpc85xx/tlb.c                                | 2 ++
 arch/powerpc/cpu/mpc85xx/traps.c                              | 1 +
 arch/powerpc/cpu/mpc86xx/cpu.c                                | 1 +
 arch/powerpc/cpu/mpc86xx/fdt.c                                | 1 +
 arch/powerpc/cpu/mpc86xx/interrupts.c                         | 1 +
 arch/powerpc/cpu/mpc86xx/mp.c                                 | 1 +
 arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c                     | 1 +
 arch/powerpc/cpu/mpc86xx/speed.c                              | 1 +
 arch/powerpc/cpu/mpc86xx/traps.c                              | 1 +
 arch/powerpc/cpu/mpc8xx/cpu.c                                 | 2 ++
 arch/powerpc/cpu/mpc8xx/cpu_init.c                            | 2 ++
 arch/powerpc/cpu/mpc8xx/immap.c                               | 2 ++
 arch/powerpc/cpu/mpc8xx/interrupts.c                          | 2 ++
 arch/powerpc/cpu/mpc8xx/speed.c                               | 2 ++
 arch/powerpc/cpu/mpc8xx/traps.c                               | 1 +
 arch/powerpc/cpu/mpc8xxx/cpu.c                                | 2 ++
 arch/powerpc/cpu/mpc8xxx/fdt.c                                | 1 +
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c                            | 1 +
 arch/powerpc/cpu/mpc8xxx/fsl_pamu.c                           | 1 +
 arch/powerpc/cpu/mpc8xxx/law.c                                | 1 +
 arch/powerpc/cpu/mpc8xxx/pamu_table.c                         | 1 +
 arch/powerpc/cpu/mpc8xxx/srio.c                               | 1 +
 arch/powerpc/include/asm/arch-mpc83xx/gpio.h                  | 1 +
 arch/powerpc/include/asm/arch-mpc85xx/gpio.h                  | 1 +
 arch/powerpc/include/asm/cache.h                              | 1 +
 arch/powerpc/include/asm/cpm_85xx.h                           | 1 +
 arch/powerpc/include/asm/cpm_8xx.h                            | 1 +
 arch/powerpc/include/asm/fsl_dma.h                            | 1 +
 arch/powerpc/include/asm/fsl_i2c.h                            | 2 ++
 arch/powerpc/include/asm/fsl_law.h                            | 1 +
 arch/powerpc/include/asm/fsl_lbc.h                            | 1 +
 arch/powerpc/include/asm/fsl_mpc83xx_serdes.h                 | 1 +
 arch/powerpc/include/asm/fsl_pamu.h                           | 1 +
 arch/powerpc/include/asm/fsl_pci.h                            | 1 +
 arch/powerpc/include/asm/fsl_portals.h                        | 1 +
 arch/powerpc/include/asm/fsl_serdes.h                         | 1 +
 arch/powerpc/include/asm/global_data.h                        | 2 +-
 arch/powerpc/include/asm/immap_86xx.h                         | 1 +
 arch/powerpc/include/asm/immap_8xx.h                          | 1 +
 arch/powerpc/include/asm/io.h                                 | 2 ++
 arch/powerpc/include/asm/iopin_8xx.h                          | 1 +
 arch/powerpc/include/asm/mmu.h                                | 1 +
 arch/powerpc/include/asm/mp.h                                 | 1 +
 arch/powerpc/include/asm/ppc.h                                | 1 +
 arch/powerpc/lib/bdinfo.c                                     | 2 ++
 arch/powerpc/lib/bootm.c                                      | 1 +
 arch/powerpc/lib/cache.c                                      | 1 +
 arch/powerpc/lib/interrupts.c                                 | 1 +
 arch/powerpc/lib/spl.c                                        | 1 +
 arch/powerpc/lib/stack.c                                      | 1 +
 arch/powerpc/lib/time.c                                       | 1 +
 arch/riscv/cpu/cpu.c                                          | 1 +
 arch/riscv/cpu/fu540/cache.c                                  | 1 +
 arch/riscv/cpu/fu540/dram.c                                   | 1 +
 arch/riscv/cpu/generic/dram.c                                 | 1 +
 arch/riscv/include/asm/global_data.h                          | 1 +
 arch/riscv/include/asm/io.h                                   | 1 +
 arch/riscv/include/asm/ptrace.h                               | 1 +
 arch/riscv/include/asm/smp.h                                  | 1 +
 arch/riscv/lib/andes_plic.c                                   | 2 ++
 arch/riscv/lib/andes_plmt.c                                   | 2 ++
 arch/riscv/lib/boot.c                                         | 1 +
 arch/riscv/lib/bootm.c                                        | 2 ++
 arch/riscv/lib/fdt_fixup.c                                    | 1 +
 arch/riscv/lib/image.c                                        | 1 +
 arch/riscv/lib/interrupts.c                                   | 1 +
 arch/riscv/lib/rdtime.c                                       | 2 ++
 arch/riscv/lib/reloc_riscv_efi.c                              | 1 +
 arch/riscv/lib/sbi.c                                          | 1 +
 arch/riscv/lib/sbi_ipi.c                                      | 1 +
 arch/riscv/lib/sifive_clint.c                                 | 2 ++
 arch/riscv/lib/smp.c                                          | 1 +
 arch/riscv/lib/spl.c                                          | 2 ++
 arch/sandbox/cpu/cpu.c                                        | 1 +
 arch/sandbox/cpu/sdl.c                                        | 1 +
 arch/sandbox/cpu/spl.c                                        | 1 +
 arch/sandbox/cpu/start.c                                      | 1 +
 arch/sandbox/cpu/state.c                                      | 1 +
 arch/sandbox/include/asm/axi.h                                | 1 +
 arch/sandbox/include/asm/clk.h                                | 1 +
 arch/sandbox/include/asm/eth.h                                | 1 +
 arch/sandbox/include/asm/global_data.h                        | 1 +
 arch/sandbox/include/asm/gpio.h                               | 1 +
 arch/sandbox/include/asm/handoff.h                            | 1 +
 arch/sandbox/include/asm/io.h                                 | 1 +
 arch/sandbox/include/asm/mbox.h                               | 1 +
 arch/sandbox/include/asm/sdl.h                                | 1 +
 arch/sandbox/include/asm/sections.h                           | 1 +
 arch/sandbox/include/asm/setjmp.h                             | 1 +
 arch/sandbox/include/asm/state.h                              | 1 +
 arch/sandbox/include/asm/test.h                               | 1 +
 arch/sandbox/include/asm/u-boot-sandbox.h                     | 1 +
 arch/sandbox/lib/bootm.c                                      | 2 ++
 arch/sandbox/lib/pci_io.c                                     | 1 +
 arch/sh/cpu/sh4/cache.c                                       | 1 +
 arch/sh/include/asm/pci.h                                     | 1 +
 arch/sh/include/asm/string.h                                  | 1 +
 arch/sh/lib/board.c                                           | 1 +
 arch/sh/lib/time_sh2.c                                        | 1 +
 arch/sh/lib/zimageboot.c                                      | 1 +
 arch/x86/cpu/acpi_gpe.c                                       | 1 +
 arch/x86/cpu/apollolake/cpu_spl.c                             | 1 +
 arch/x86/cpu/apollolake/fsp_bindings.c                        | 1 +
 arch/x86/cpu/apollolake/fsp_s.c                               | 2 ++
 arch/x86/cpu/apollolake/hostbridge.c                          | 1 +
 arch/x86/cpu/apollolake/lpc.c                                 | 1 +
 arch/x86/cpu/apollolake/pmc.c                                 | 2 ++
 arch/x86/cpu/apollolake/punit.c                               | 1 +
 arch/x86/cpu/apollolake/spl.c                                 | 1 +
 arch/x86/cpu/apollolake/uart.c                                | 1 +
 arch/x86/cpu/baytrail/acpi.c                                  | 1 +
 arch/x86/cpu/baytrail/cpu.c                                   | 1 +
 arch/x86/cpu/baytrail/early_uart.c                            | 1 +
 arch/x86/cpu/baytrail/fsp_configs.c                           | 1 +
 arch/x86/cpu/braswell/early_uart.c                            | 1 +
 arch/x86/cpu/braswell/fsp_configs.c                           | 1 +
 arch/x86/cpu/broadwell/adsp.c                                 | 1 +
 arch/x86/cpu/broadwell/cpu_full.c                             | 2 ++
 arch/x86/cpu/broadwell/iobp.c                                 | 1 +
 arch/x86/cpu/broadwell/lpc.c                                  | 1 +
 arch/x86/cpu/broadwell/me.c                                   | 1 +
 arch/x86/cpu/broadwell/northbridge.c                          | 2 ++
 arch/x86/cpu/broadwell/pch.c                                  | 2 ++
 arch/x86/cpu/broadwell/pinctrl_broadwell.c                    | 2 ++
 arch/x86/cpu/broadwell/refcode.c                              | 2 ++
 arch/x86/cpu/broadwell/sata.c                                 | 1 +
 arch/x86/cpu/broadwell/sdram.c                                | 1 +
 arch/x86/cpu/coreboot/coreboot.c                              | 1 +
 arch/x86/cpu/coreboot/sdram.c                                 | 1 +
 arch/x86/cpu/coreboot/tables.c                                | 2 ++
 arch/x86/cpu/coreboot/timestamp.c                             | 2 ++
 arch/x86/cpu/cpu.c                                            | 2 ++
 arch/x86/cpu/efi/payload.c                                    | 1 +
 arch/x86/cpu/efi/sdram.c                                      | 1 +
 arch/x86/cpu/i386/cpu.c                                       | 3 +++
 arch/x86/cpu/i386/interrupt.c                                 | 2 ++
 arch/x86/cpu/intel_common/cpu.c                               | 1 +
 arch/x86/cpu/intel_common/fast_spi.c                          | 1 +
 arch/x86/cpu/intel_common/itss.c                              | 2 ++
 arch/x86/cpu/intel_common/lpc.c                               | 2 ++
 arch/x86/cpu/intel_common/microcode.c                         | 1 +
 arch/x86/cpu/intel_common/mrc.c                               | 2 ++
 arch/x86/cpu/intel_common/p2sb.c                              | 2 ++
 arch/x86/cpu/intel_common/pch.c                               | 1 +
 arch/x86/cpu/intel_common/report_platform.c                   | 1 +
 arch/x86/cpu/ioapic.c                                         | 1 +
 arch/x86/cpu/irq.c                                            | 1 +
 arch/x86/cpu/ivybridge/bd82x6x.c                              | 1 +
 arch/x86/cpu/ivybridge/cpu.c                                  | 1 +
 arch/x86/cpu/ivybridge/early_me.c                             | 1 +
 arch/x86/cpu/ivybridge/lpc.c                                  | 1 +
 arch/x86/cpu/ivybridge/model_206ax.c                          | 2 ++
 arch/x86/cpu/ivybridge/northbridge.c                          | 1 +
 arch/x86/cpu/ivybridge/sata.c                                 | 1 +
 arch/x86/cpu/ivybridge/sdram.c                                | 1 +
 arch/x86/cpu/mp_init.c                                        | 2 ++
 arch/x86/cpu/mtrr.c                                           | 1 +
 arch/x86/cpu/pci.c                                            | 1 +
 arch/x86/cpu/qemu/dram.c                                      | 1 +
 arch/x86/cpu/qemu/qemu.c                                      | 1 +
 arch/x86/cpu/quark/acpi.c                                     | 1 +
 arch/x86/cpu/quark/dram.c                                     | 1 +
 arch/x86/cpu/quark/hte.c                                      | 1 +
 arch/x86/cpu/quark/hte.h                                      | 1 +
 arch/x86/cpu/quark/mrc.c                                      | 1 +
 arch/x86/cpu/quark/mrc_util.c                                 | 1 +
 arch/x86/cpu/quark/mrc_util.h                                 | 1 +
 arch/x86/cpu/quark/msg_port.c                                 | 1 +
 arch/x86/cpu/quark/quark.c                                    | 1 +
 arch/x86/cpu/quark/smc.c                                      | 1 +
 arch/x86/cpu/quark/smc.h                                      | 1 +
 arch/x86/cpu/queensbay/tnc.c                                  | 1 +
 arch/x86/cpu/slimbootloader/sdram.c                           | 1 +
 arch/x86/cpu/tangier/acpi.c                                   | 1 +
 arch/x86/cpu/tangier/pinmux.c                                 | 3 +++
 arch/x86/cpu/tangier/sdram.c                                  | 1 +
 arch/x86/include/asm/acpi_nhlt.h                              | 1 +
 arch/x86/include/asm/acpi_table.h                             | 1 +
 arch/x86/include/asm/arch-apollolake/fsp/fsp_m_upd.h          | 2 ++
 arch/x86/include/asm/arch-apollolake/fsp/fsp_s_upd.h          | 2 ++
 arch/x86/include/asm/arch-apollolake/fsp_bindings.h           | 1 +
 arch/x86/include/asm/arch-apollolake/global_nvs.h             | 2 ++
 arch/x86/include/asm/arch-apollolake/lpc.h                    | 1 +
 arch/x86/include/asm/arch-apollolake/uart.h                   | 1 +
 arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h              | 2 ++
 arch/x86/include/asm/arch-baytrail/global_nvs.h               | 2 ++
 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h              | 2 ++
 arch/x86/include/asm/arch-broadwell/gpio.h                    | 1 +
 arch/x86/include/asm/arch-broadwell/me.h                      | 2 ++
 arch/x86/include/asm/arch-broadwell/pch.h                     | 1 +
 arch/x86/include/asm/arch-broadwell/pei_data.h                | 2 ++
 arch/x86/include/asm/arch-broadwell/pm.h                      | 1 +
 arch/x86/include/asm/arch-coreboot/sysinfo.h                  | 1 +
 arch/x86/include/asm/arch-coreboot/timestamp.h                | 1 +
 arch/x86/include/asm/arch-ivybridge/fsp/fsp_configs.h         | 1 +
 arch/x86/include/asm/arch-ivybridge/me.h                      | 2 ++
 arch/x86/include/asm/arch-ivybridge/model_206ax.h             | 1 +
 arch/x86/include/asm/arch-ivybridge/pch.h                     | 1 +
 arch/x86/include/asm/arch-ivybridge/pei_data.h                | 2 ++
 arch/x86/include/asm/arch-qemu/qemu.h                         | 1 +
 arch/x86/include/asm/arch-quark/global_nvs.h                  | 2 ++
 arch/x86/include/asm/arch-quark/mrc.h                         | 1 +
 arch/x86/include/asm/arch-quark/msg_port.h                    | 1 +
 arch/x86/include/asm/arch-quark/quark.h                       | 1 +
 arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h             | 2 ++
 arch/x86/include/asm/arch-queensbay/tnc.h                     | 1 +
 arch/x86/include/asm/arch-slimbootloader/slimbootloader.h     | 1 +
 arch/x86/include/asm/arch-tangier/global_nvs.h                | 2 ++
 arch/x86/include/asm/bootm.h                                  | 1 +
 arch/x86/include/asm/coreboot_tables.h                        | 2 ++
 arch/x86/include/asm/cpu.h                                    | 1 +
 arch/x86/include/asm/cpu_common.h                             | 1 +
 arch/x86/include/asm/early_cmos.h                             | 1 +
 arch/x86/include/asm/fast_spi.h                               | 1 +
 arch/x86/include/asm/fsp/fsp_api.h                            | 1 +
 arch/x86/include/asm/fsp/fsp_azalia.h                         | 2 ++
 arch/x86/include/asm/fsp/fsp_fv.h                             | 1 +
 arch/x86/include/asm/fsp/fsp_hob.h                            | 2 ++
 arch/x86/include/asm/fsp/fsp_infoheader.h                     | 2 ++
 arch/x86/include/asm/fsp/fsp_support.h                        | 1 +
 arch/x86/include/asm/fsp1/fsp_api.h                           | 1 +
 arch/x86/include/asm/fsp1/fsp_ffs.h                           | 2 ++
 arch/x86/include/asm/fsp1/fsp_support.h                       | 1 +
 arch/x86/include/asm/fsp2/fsp_api.h                           | 2 ++
 arch/x86/include/asm/fsp2/fsp_internal.h                      | 1 +
 arch/x86/include/asm/global_data.h                            | 2 ++
 arch/x86/include/asm/gpio.h                                   | 1 +
 arch/x86/include/asm/handoff.h                                | 2 ++
 arch/x86/include/asm/hob.h                                    | 1 +
 arch/x86/include/asm/intel_pinctrl.h                          | 1 +
 arch/x86/include/asm/io.h                                     | 1 +
 arch/x86/include/asm/ioapic.h                                 | 1 +
 arch/x86/include/asm/irq.h                                    | 1 +
 arch/x86/include/asm/me_common.h                              | 1 +
 arch/x86/include/asm/microcode.h                              | 1 +
 arch/x86/include/asm/mpspec.h                                 | 1 +
 arch/x86/include/asm/mrc_common.h                             | 1 +
 arch/x86/include/asm/mrccache.h                               | 1 +
 arch/x86/include/asm/mtrr.h                                   | 2 ++
 arch/x86/include/asm/pch_common.h                             | 1 +
 arch/x86/include/asm/pci.h                                    | 1 +
 arch/x86/include/asm/pirq_routing.h                           | 2 ++
 arch/x86/include/asm/pnp_def.h                                | 1 +
 arch/x86/include/asm/processor.h                              | 1 +
 arch/x86/include/asm/scu.h                                    | 1 +
 arch/x86/include/asm/sfi.h                                    | 1 +
 arch/x86/include/asm/sipi.h                                   | 2 ++
 arch/x86/include/asm/speedstep.h                              | 1 +
 arch/x86/include/asm/spl.h                                    | 1 +
 arch/x86/include/asm/tables.h                                 | 1 +
 arch/x86/include/asm/u-boot-x86.h                             | 1 +
 arch/x86/include/asm/zimage.h                                 | 1 +
 arch/x86/lib/acpi.c                                           | 1 +
 arch/x86/lib/acpi_nhlt.c                                      | 1 +
 arch/x86/lib/acpi_table.c                                     | 2 ++
 arch/x86/lib/bios.c                                           | 1 +
 arch/x86/lib/bios.h                                           | 3 +++
 arch/x86/lib/bios_interrupts.c                                | 1 +
 arch/x86/lib/bootm.c                                          | 1 +
 arch/x86/lib/cmd_boot.c                                       | 1 +
 arch/x86/lib/coreboot_table.c                                 | 1 +
 arch/x86/lib/div64.c                                          | 2 ++
 arch/x86/lib/e820.c                                           | 1 +
 arch/x86/lib/early_cmos.c                                     | 1 +
 arch/x86/lib/fsp/fsp_common.c                                 | 1 +
 arch/x86/lib/fsp/fsp_dram.c                                   | 1 +
 arch/x86/lib/fsp/fsp_graphics.c                               | 1 +
 arch/x86/lib/fsp/fsp_support.c                                | 1 +
 arch/x86/lib/fsp1/fsp_dram.c                                  | 1 +
 arch/x86/lib/fsp1/fsp_support.c                               | 1 +
 arch/x86/lib/fsp2/fsp_dram.c                                  | 1 +
 arch/x86/lib/fsp2/fsp_init.c                                  | 1 +
 arch/x86/lib/fsp2/fsp_meminit.c                               | 1 +
 arch/x86/lib/fsp2/fsp_silicon_init.c                          | 1 +
 arch/x86/lib/fsp2/fsp_support.c                               | 2 ++
 arch/x86/lib/hob.c                                            | 1 +
 arch/x86/lib/i8254.c                                          | 1 +
 arch/x86/lib/i8259.c                                          | 1 +
 arch/x86/lib/interrupts.c                                     | 1 +
 arch/x86/lib/mpspec.c                                         | 3 +++
 arch/x86/lib/mrccache.c                                       | 1 +
 arch/x86/lib/physmem.c                                        | 1 +
 arch/x86/lib/pinctrl_ich6.c                                   | 1 +
 arch/x86/lib/pirq_routing.c                                   | 2 ++
 arch/x86/lib/pmu.c                                            | 1 +
 arch/x86/lib/ramtest.c                                        | 1 +
 arch/x86/lib/relocate.c                                       | 1 +
 arch/x86/lib/scu.c                                            | 1 +
 arch/x86/lib/sfi.c                                            | 1 +
 arch/x86/lib/spl.c                                            | 2 ++
 arch/x86/lib/tables.c                                         | 1 +
 arch/x86/lib/tpl.c                                            | 2 ++
 arch/x86/lib/zimage.c                                         | 1 +
 arch/xtensa/cpu/cpu.c                                         | 1 +
 arch/xtensa/include/asm/ldscript.h                            | 1 +
 arch/xtensa/lib/bootm.c                                       | 1 +
 arch/xtensa/lib/cache.c                                       | 1 +
 arch/xtensa/lib/relocate.c                                    | 1 +
 arch/xtensa/lib/time.c                                        | 1 +
 board/AndesTech/adp-ae3xx/adp-ae3xx.c                         | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c                       | 1 +
 board/AndesTech/ax25-ae350/ax25-ae350.c                       | 1 +
 board/Arcturus/ucp1020/cmd_arc.c                              | 1 +
 board/Arcturus/ucp1020/ddr.c                                  | 1 +
 board/Arcturus/ucp1020/spl.c                                  | 1 +
 board/Arcturus/ucp1020/spl_minimal.c                          | 1 +
 board/Arcturus/ucp1020/ucp1020.c                              | 1 +
 board/BuR/brppt1/board.c                                      | 1 +
 board/BuR/brppt2/board.c                                      | 1 +
 board/BuR/brsmarc1/board.c                                    | 1 +
 board/BuR/brxre1/board.c                                      | 1 +
 board/BuR/common/br_resetc.c                                  | 2 ++
 board/BuR/common/br_resetc.h                                  | 1 +
 board/BuR/common/bur_common.h                                 | 1 +
 board/BuR/common/common.c                                     | 1 +
 board/BuS/eb_cpu5282/eb_cpu5282.c                             | 1 +
 board/CZ.NIC/turris_mox/mox_sp.c                              | 1 +
 board/CZ.NIC/turris_mox/mox_sp.h                              | 1 +
 board/CZ.NIC/turris_mox/turris_mox.c                          | 1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c                      | 2 ++
 board/LaCie/common/common.c                                   | 1 +
 board/LaCie/common/common.h                                   | 1 +
 board/LaCie/edminiv2/edminiv2.c                               | 1 +
 board/LaCie/net2big_v2/net2big_v2.c                           | 1 +
 board/LaCie/netspace_v2/netspace_v2.c                         | 1 +
 board/Marvell/aspenite/aspenite.c                             | 1 +
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c                   | 1 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c                 | 1 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c                   | 1 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c                   | 1 +
 board/Marvell/dreamplug/dreamplug.c                           | 1 +
 board/Marvell/gplugd/gplugd.c                                 | 1 +
 board/Marvell/guruplug/guruplug.c                             | 1 +
 board/Marvell/mvebu_armada-37xx/board.c                       | 1 +
 board/Marvell/mvebu_armada-8k/board.c                         | 1 +
 board/Marvell/openrd/openrd.c                                 | 1 +
 board/Marvell/sheevaplug/sheevaplug.c                         | 1 +
 board/Seagate/dockstar/dockstar.c                             | 1 +
 board/Seagate/goflexhome/goflexhome.c                         | 1 +
 board/Seagate/nas220/nas220.c                                 | 1 +
 board/Synology/ds109/ds109.c                                  | 1 +
 board/Synology/ds109/ds109.h                                  | 1 +
 board/Synology/ds414/cmd_syno.c                               | 1 +
 board/Synology/ds414/ds414.c                                  | 1 +
 board/abilis/tb100/tb100.c                                    | 1 +
 board/advantech/dms-ba16/dms-ba16.c                           | 1 +
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c         | 1 +
 board/advantech/imx8qm_rom7720_a1/spl.c                       | 1 +
 board/advantech/som-db5800-som-6867/som-db5800-som-6867.c     | 1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c                   | 1 +
 board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c               | 1 +
 board/alliedtelesis/x530/x530.c                               | 1 +
 board/altera/arria5-socdk/qts/pinmux_config.h                 | 1 +
 board/altera/arria5-socdk/qts/sdram_config.h                  | 1 +
 board/altera/cyclone5-socdk/qts/pinmux_config.h               | 1 +
 board/altera/cyclone5-socdk/qts/sdram_config.h                | 1 +
 board/amazon/kc1/kc1.c                                        | 1 +
 board/amlogic/odroid-n2/odroid-n2.c                           | 1 +
 board/amlogic/p200/p200.c                                     | 1 +
 board/amlogic/p201/p201.c                                     | 1 +
 board/amlogic/p212/p212.c                                     | 1 +
 board/amlogic/q200/q200.c                                     | 1 +
 board/aries/mcvevk/qts/pinmux_config.h                        | 1 +
 board/aries/mcvevk/qts/sdram_config.h                         | 1 +
 board/aristainetos/aristainetos.c                             | 1 +
 board/armadeus/apf27/apf27.c                                  | 1 +
 board/armltd/integrator/integrator.c                          | 1 +
 board/armltd/integrator/pci.c                                 | 1 +
 board/armltd/integrator/timer.c                               | 1 +
 board/armltd/vexpress/vexpress_common.c                       | 1 +
 board/armltd/vexpress/vexpress_tc2.c                          | 1 +
 board/armltd/vexpress64/pcie.c                                | 1 +
 board/armltd/vexpress64/vexpress64.c                          | 2 ++
 board/astro/mcf5373l/fpga.c                                   | 1 +
 board/astro/mcf5373l/mcf5373l.c                               | 1 +
 board/atmark-techno/armadillo-800eva/armadillo-800eva.c       | 1 +
 board/atmel/at91rm9200ek/at91rm9200ek.c                       | 1 +
 board/atmel/at91sam9261ek/at91sam9261ek.c                     | 1 +
 board/atmel/at91sam9263ek/at91sam9263ek.c                     | 1 +
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c               | 1 +
 board/atmel/at91sam9n12ek/at91sam9n12ek.c                     | 1 +
 board/atmel/at91sam9rlek/at91sam9rlek.c                       | 1 +
 board/atmel/common/board.c                                    | 1 +
 board/atmel/common/mac-spi-nor.c                              | 1 +
 board/atmel/common/video_display.c                            | 1 +
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c               | 1 +
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c           | 1 +
 board/atmel/sama5d2_icp/sama5d2_icp.c                         | 1 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c               | 1 +
 board/atmel/sama5d3_xplained/sama5d3_xplained.c               | 1 +
 board/atmel/sama5d3xek/sama5d3xek.c                           | 1 +
 board/atmel/sama5d4_xplained/sama5d4_xplained.c               | 1 +
 board/atmel/sama5d4ek/sama5d4ek.c                             | 1 +
 board/avionic-design/common/tamonten-ng.c                     | 1 +
 board/bachmann/ot1200/ot1200.c                                | 1 +
 board/bachmann/ot1200/ot1200_spl.c                            | 1 +
 board/barco/platinum/spl_picon.c                              | 1 +
 board/barco/platinum/spl_titanium.c                           | 1 +
 board/beacon/beacon-rzg2m/beacon-rzg2m.c                      | 1 +
 board/beacon/imx8mm/spl.c                                     | 1 +
 board/beckhoff/mx53cx9020/mx53cx9020.c                        | 1 +
 board/beckhoff/mx53cx9020/mx53cx9020_video.c                  | 1 +
 board/bluegiga/apx4devkit/apx4devkit.c                        | 1 +
 board/bluegiga/apx4devkit/spl_boot.c                          | 1 +
 board/bluewater/gurnard/gurnard.c                             | 1 +
 board/bosch/shc/board.c                                       | 1 +
 board/bosch/shc/board.h                                       | 1 +
 board/boundary/nitrogen6x/nitrogen6x.c                        | 1 +
 board/broadcom/bcm_ep/board.c                                 | 1 +
 board/broadcom/bcmns2/northstar2.c                            | 1 +
 board/broadcom/bcmns3/ns3.c                                   | 1 +
 board/bticino/mamoj/spl.c                                     | 1 +
 board/buffalo/lsxl/lsxl.c                                     | 1 +
 board/cadence/xtfpga/xtfpga.c                                 | 1 +
 board/cavium/thunderx/atf.c                                   | 1 +
 board/cavium/thunderx/thunderx.c                              | 1 +
 board/ccv/xpress/spl.c                                        | 1 +
 board/ccv/xpress/xpress.c                                     | 1 +
 board/cirrus/edb93xx/edb93xx.c                                | 1 +
 board/cloudengines/pogo_e02/pogo_e02.c                        | 1 +
 board/cobra5272/flash.c                                       | 1 +
 board/compulab/cl-som-imx7/cl-som-imx7.c                      | 1 +
 board/compulab/cl-som-imx7/spl.c                              | 1 +
 board/compulab/cm_fx6/cm_fx6.c                                | 1 +
 board/compulab/cm_fx6/spl.c                                   | 1 +
 board/compulab/cm_t335/cm_t335.c                              | 1 +
 board/compulab/cm_t43/cm_t43.c                                | 1 +
 board/compulab/cm_t43/spl.c                                   | 1 +
 board/compulab/common/common.c                                | 2 ++
 board/compulab/common/common.h                                | 1 +
 board/compulab/common/eeprom.c                                | 1 +
 board/compulab/common/eeprom.h                                | 1 +
 board/compulab/common/omap3_display.c                         | 1 +
 board/compulab/common/omap3_smc911x.c                         | 1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c                      | 2 ++
 board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c    | 1 +
 board/corscience/tricorder/led.c                              | 1 +
 board/corscience/tricorder/tricorder-eeprom.c                 | 2 ++
 board/corscience/tricorder/tricorder-eeprom.h                 | 2 ++
 board/corscience/tricorder/tricorder.c                        | 1 +
 board/cortina/presidio-asic/presidio.c                        | 1 +
 board/creative/xfi3/spl_boot.c                                | 1 +
 board/creative/xfi3/xfi3.c                                    | 1 +
 board/cssi/MCR3000/MCR3000.c                                  | 2 ++
 board/cssi/MCR3000/nand.c                                     | 1 +
 board/d-link/dns325/dns325.c                                  | 1 +
 board/davinci/da8xxevm/da850evm.c                             | 1 +
 board/davinci/da8xxevm/omapl138_lcdk.c                        | 1 +
 board/devboards/dbm-soc1/qts/pinmux_config.h                  | 1 +
 board/devboards/dbm-soc1/qts/sdram_config.h                   | 1 +
 board/dhelectronics/dh_imx6/dh_imx6.c                         | 1 +
 board/dhelectronics/dh_imx6/dh_imx6_spl.c                     | 1 +
 board/dhelectronics/dh_stm32mp1/board.c                       | 2 ++
 board/ebv/socrates/qts/pinmux_config.h                        | 1 +
 board/ebv/socrates/qts/sdram_config.h                         | 1 +
 board/eets/pdu001/board.c                                     | 1 +
 board/eets/pdu001/board.h                                     | 1 +
 board/eets/pdu001/mux.c                                       | 1 +
 board/egnite/ethernut5/ethernut5_pwrman.c                     | 1 +
 board/el/el6x/el6x.c                                          | 1 +
 board/embest/mx6boards/mx6boards.c                            | 1 +
 board/emulation/qemu-arm/qemu-arm.c                           | 1 +
 board/emulation/qemu-riscv/qemu-riscv.c                       | 1 +
 board/engicam/common/board.c                                  | 1 +
 board/engicam/common/spl.c                                    | 1 +
 board/engicam/imx6q/imx6q.c                                   | 1 +
 board/esd/meesc/meesc.c                                       | 1 +
 board/esd/vme8349/caddy.c                                     | 1 +
 board/esd/vme8349/caddy.h                                     | 1 +
 board/esd/vme8349/pci.c                                       | 1 +
 board/esd/vme8349/vme8349.c                                   | 1 +
 board/freescale/common/arm_sleep.c                            | 2 ++
 board/freescale/common/cadmus.c                               | 1 +
 board/freescale/common/cds_pci_ft.c                           | 1 +
 board/freescale/common/cmd_esbc_validate.c                    | 1 +
 board/freescale/common/dcu_sii9022a.c                         | 1 +
 board/freescale/common/diu_ch7301.c                           | 1 +
 board/freescale/common/emc2305.c                              | 1 +
 board/freescale/common/emc2305.h                              | 1 +
 board/freescale/common/fman.c                                 | 1 +
 board/freescale/common/fman.h                                 | 1 +
 board/freescale/common/fsl_chain_of_trust.c                   | 2 ++
 board/freescale/common/fsl_validate.c                         | 2 ++
 board/freescale/common/ics307_clk.c                           | 1 +
 board/freescale/common/idt8t49n222a_serdes_clk.h              | 1 +
 board/freescale/common/ls102xa_stream_id.c                    | 1 +
 board/freescale/common/mc34vr500.c                            | 1 +
 board/freescale/common/mpc85xx_sleep.c                        | 2 ++
 board/freescale/common/ngpixis.c                              | 1 +
 board/freescale/common/ngpixis.h                              | 1 +
 board/freescale/common/ns_access.c                            | 1 +
 board/freescale/common/pfuze.c                                | 1 +
 board/freescale/common/pfuze.h                                | 1 +
 board/freescale/common/pixis.c                                | 1 +
 board/freescale/common/pixis.h                                | 1 +
 board/freescale/common/pq-mds-pib.c                           | 1 +
 board/freescale/common/qixis.c                                | 2 ++
 board/freescale/common/qixis.h                                | 1 +
 board/freescale/common/sdhc_boot.c                            | 1 +
 board/freescale/common/sgmii_riser.c                          | 1 +
 board/freescale/common/spl.h                                  | 1 +
 board/freescale/common/sys_eeprom.c                           | 2 ++
 board/freescale/common/vid.c                                  | 2 ++
 board/freescale/common/vid.h                                  | 1 +
 board/freescale/corenet_ds/corenet_ds.c                       | 1 +
 board/freescale/corenet_ds/ddr.c                              | 1 +
 board/freescale/corenet_ds/eth_hydra.c                        | 1 +
 board/freescale/corenet_ds/eth_p4080.c                        | 1 +
 board/freescale/corenet_ds/eth_superhydra.c                   | 1 +
 board/freescale/imx8mm_evk/spl.c                              | 1 +
 board/freescale/imx8mn_evk/spl.c                              | 1 +
 board/freescale/imx8mp_evk/spl.c                              | 1 +
 board/freescale/imx8mq_evk/spl.c                              | 1 +
 board/freescale/imx8qm_mek/imx8qm_mek.c                       | 2 ++
 board/freescale/imx8qm_mek/spl.c                              | 1 +
 board/freescale/imx8qxp_mek/imx8qxp_mek.c                     | 2 ++
 board/freescale/imx8qxp_mek/spl.c                             | 1 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c                 | 1 +
 board/freescale/imxrt1050-evk/imxrt1050-evk.c                 | 1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c                     | 1 +
 board/freescale/ls1012aqds/eth.c                              | 1 +
 board/freescale/ls1012aqds/ls1012aqds.c                       | 2 ++
 board/freescale/ls1012ardb/eth.c                              | 1 +
 board/freescale/ls1012ardb/ls1012ardb.c                       | 1 +
 board/freescale/ls1021aiot/ls1021aiot.c                       | 1 +
 board/freescale/ls1021aqds/dcu.c                              | 1 +
 board/freescale/ls1021aqds/ddr.c                              | 2 ++
 board/freescale/ls1021aqds/ddr.h                              | 1 +
 board/freescale/ls1021aqds/eth.c                              | 1 +
 board/freescale/ls1021aqds/ls1021aqds.c                       | 2 ++
 board/freescale/ls1021atsn/ls1021atsn.c                       | 1 +
 board/freescale/ls1021atwr/ls1021atwr.c                       | 2 ++
 board/freescale/ls1028a/ls1028a.c                             | 2 ++
 board/freescale/ls1043aqds/ddr.c                              | 1 +
 board/freescale/ls1043aqds/ddr.h                              | 1 +
 board/freescale/ls1043aqds/eth.c                              | 1 +
 board/freescale/ls1043aqds/ls1043aqds.c                       | 2 ++
 board/freescale/ls1043ardb/cpld.c                             | 1 +
 board/freescale/ls1043ardb/cpld.h                             | 1 +
 board/freescale/ls1043ardb/ddr.c                              | 1 +
 board/freescale/ls1043ardb/ddr.h                              | 1 +
 board/freescale/ls1043ardb/eth.c                              | 1 +
 board/freescale/ls1043ardb/ls1043ardb.c                       | 1 +
 board/freescale/ls1046afrwy/eth.c                             | 1 +
 board/freescale/ls1046afrwy/ls1046afrwy.c                     | 1 +
 board/freescale/ls1046aqds/ddr.c                              | 1 +
 board/freescale/ls1046aqds/ddr.h                              | 1 +
 board/freescale/ls1046aqds/eth.c                              | 1 +
 board/freescale/ls1046aqds/ls1046aqds.c                       | 2 ++
 board/freescale/ls1046ardb/cpld.c                             | 1 +
 board/freescale/ls1046ardb/cpld.h                             | 1 +
 board/freescale/ls1046ardb/ddr.c                              | 1 +
 board/freescale/ls1046ardb/ddr.h                              | 1 +
 board/freescale/ls1046ardb/eth.c                              | 1 +
 board/freescale/ls1046ardb/ls1046ardb.c                       | 1 +
 board/freescale/ls1088a/ddr.c                                 | 1 +
 board/freescale/ls1088a/ddr.h                                 | 1 +
 board/freescale/ls1088a/eth_ls1088aqds.c                      | 3 +++
 board/freescale/ls1088a/eth_ls1088ardb.c                      | 1 +
 board/freescale/ls1088a/ls1088a.c                             | 3 +++
 board/freescale/ls2080a/ddr.c                                 | 1 +
 board/freescale/ls2080a/ddr.h                                 | 1 +
 board/freescale/ls2080a/ls2080a.c                             | 1 +
 board/freescale/ls2080aqds/ddr.c                              | 1 +
 board/freescale/ls2080aqds/ddr.h                              | 1 +
 board/freescale/ls2080aqds/eth.c                              | 3 +++
 board/freescale/ls2080aqds/ls2080aqds.c                       | 2 ++
 board/freescale/ls2080ardb/ddr.c                              | 1 +
 board/freescale/ls2080ardb/ddr.h                              | 1 +
 board/freescale/ls2080ardb/eth_ls2080rdb.c                    | 1 +
 board/freescale/ls2080ardb/ls2080ardb.c                       | 2 ++
 board/freescale/lx2160a/eth_lx2160aqds.c                      | 2 ++
 board/freescale/lx2160a/eth_lx2160ardb.c                      | 1 +
 board/freescale/lx2160a/lx2160a.c                             | 2 ++
 board/freescale/m5208evbe/m5208evbe.c                         | 1 +
 board/freescale/m52277evb/m52277evb.c                         | 1 +
 board/freescale/m5235evb/m5235evb.c                           | 1 +
 board/freescale/m5249evb/m5249evb.c                           | 1 +
 board/freescale/m5253demo/flash.c                             | 1 +
 board/freescale/m5253demo/m5253demo.c                         | 1 +
 board/freescale/m5282evb/m5282evb.c                           | 1 +
 board/freescale/m53017evb/m53017evb.c                         | 1 +
 board/freescale/m5329evb/m5329evb.c                           | 1 +
 board/freescale/m5329evb/nand.c                               | 1 +
 board/freescale/m5373evb/m5373evb.c                           | 1 +
 board/freescale/m5373evb/nand.c                               | 1 +
 board/freescale/m54418twr/m54418twr.c                         | 1 +
 board/freescale/m54451evb/m54451evb.c                         | 1 +
 board/freescale/m54455evb/m54455evb.c                         | 1 +
 board/freescale/m547xevb/m547xevb.c                           | 1 +
 board/freescale/m548xevb/m548xevb.c                           | 1 +
 board/freescale/mpc8308rdb/mpc8308rdb.c                       | 1 +
 board/freescale/mpc8308rdb/sdram.c                            | 1 +
 board/freescale/mpc8313erdb/mpc8313erdb.c                     | 1 +
 board/freescale/mpc8313erdb/sdram.c                           | 1 +
 board/freescale/mpc8315erdb/mpc8315erdb.c                     | 1 +
 board/freescale/mpc8315erdb/sdram.c                           | 1 +
 board/freescale/mpc8323erdb/mpc8323erdb.c                     | 1 +
 board/freescale/mpc832xemds/mpc832xemds.c                     | 1 +
 board/freescale/mpc8349emds/ddr.c                             | 1 +
 board/freescale/mpc8349emds/mpc8349emds.c                     | 1 +
 board/freescale/mpc8349emds/pci.c                             | 1 +
 board/freescale/mpc8349itx/mpc8349itx.c                       | 1 +
 board/freescale/mpc8349itx/pci.c                              | 1 +
 board/freescale/mpc837xemds/mpc837xemds.c                     | 2 ++
 board/freescale/mpc837xemds/pci.c                             | 1 +
 board/freescale/mpc837xerdb/mpc837xerdb.c                     | 2 ++
 board/freescale/mpc837xerdb/pci.c                             | 1 +
 board/freescale/mpc8541cds/mpc8541cds.c                       | 1 +
 board/freescale/mpc8544ds/mpc8544ds.c                         | 1 +
 board/freescale/mpc8548cds/mpc8548cds.c                       | 1 +
 board/freescale/mpc8555cds/mpc8555cds.c                       | 1 +
 board/freescale/mpc8568mds/bcsr.c                             | 1 +
 board/freescale/mpc8568mds/mpc8568mds.c                       | 1 +
 board/freescale/mpc8569mds/bcsr.c                             | 1 +
 board/freescale/mpc8569mds/mpc8569mds.c                       | 2 ++
 board/freescale/mpc8572ds/ddr.c                               | 1 +
 board/freescale/mpc8572ds/mpc8572ds.c                         | 2 ++
 board/freescale/mpc8610hpcd/mpc8610hpcd.c                     | 2 ++
 board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c                 | 1 +
 board/freescale/mpc8641hpcn/ddr.c                             | 1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c                     | 2 ++
 board/freescale/mx23evk/spl_boot.c                            | 1 +
 board/freescale/mx28evk/iomux.c                               | 1 +
 board/freescale/mx51evk/mx51evk.c                             | 1 +
 board/freescale/mx53ard/mx53ard.c                             | 1 +
 board/freescale/mx53evk/mx53evk.c                             | 1 +
 board/freescale/mx53loco/mx53loco.c                           | 1 +
 board/freescale/mx53smd/mx53smd.c                             | 1 +
 board/freescale/mx6memcal/spl.c                               | 1 +
 board/freescale/mx6qarm2/mx6qarm2.c                           | 1 +
 board/freescale/mx6sabreauto/mx6sabreauto.c                   | 1 +
 board/freescale/mx6sabresd/mx6sabresd.c                       | 1 +
 board/freescale/mx6slevk/mx6slevk.c                           | 1 +
 board/freescale/mx6sllevk/mx6sllevk.c                         | 1 +
 board/freescale/mx6sxsabreauto/mx6sxsabreauto.c               | 1 +
 board/freescale/mx6sxsabresd/mx6sxsabresd.c                   | 1 +
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c             | 1 +
 board/freescale/p1010rdb/ddr.c                                | 1 +
 board/freescale/p1010rdb/p1010rdb.c                           | 2 ++
 board/freescale/p1010rdb/spl.c                                | 1 +
 board/freescale/p1010rdb/spl_minimal.c                        | 1 +
 board/freescale/p1023rdb/p1023rdb.c                           | 1 +
 board/freescale/p1_p2_rdb_pc/ddr.c                            | 1 +
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c                   | 1 +
 board/freescale/p1_p2_rdb_pc/spl.c                            | 1 +
 board/freescale/p1_p2_rdb_pc/spl_minimal.c                    | 1 +
 board/freescale/p2041rdb/cpld.c                               | 1 +
 board/freescale/p2041rdb/cpld.h                               | 1 +
 board/freescale/p2041rdb/ddr.c                                | 1 +
 board/freescale/p2041rdb/eth.c                                | 1 +
 board/freescale/p2041rdb/p2041rdb.c                           | 1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c                   | 1 +
 board/freescale/s32v234evb/clock.c                            | 1 +
 board/freescale/s32v234evb/lpddr2.c                           | 1 +
 board/freescale/t102xrdb/cpld.c                               | 1 +
 board/freescale/t102xrdb/cpld.h                               | 1 +
 board/freescale/t102xrdb/ddr.c                                | 2 ++
 board/freescale/t102xrdb/eth_t102xrdb.c                       | 1 +
 board/freescale/t102xrdb/spl.c                                | 2 ++
 board/freescale/t102xrdb/t102xrdb.c                           | 2 ++
 board/freescale/t102xrdb/t102xrdb.h                           | 1 +
 board/freescale/t104xrdb/cpld.c                               | 1 +
 board/freescale/t104xrdb/cpld.h                               | 1 +
 board/freescale/t104xrdb/ddr.c                                | 2 ++
 board/freescale/t104xrdb/ddr.h                                | 1 +
 board/freescale/t104xrdb/diu.c                                | 1 +
 board/freescale/t104xrdb/spl.c                                | 1 +
 board/freescale/t104xrdb/t104xrdb.c                           | 2 ++
 board/freescale/t208xqds/ddr.c                                | 1 +
 board/freescale/t208xqds/ddr.h                                | 1 +
 board/freescale/t208xqds/eth_t208xqds.c                       | 1 +
 board/freescale/t208xqds/spl.c                                | 1 +
 board/freescale/t208xqds/t208xqds.c                           | 1 +
 board/freescale/t208xrdb/cpld.c                               | 1 +
 board/freescale/t208xrdb/cpld.h                               | 1 +
 board/freescale/t208xrdb/ddr.c                                | 1 +
 board/freescale/t208xrdb/ddr.h                                | 1 +
 board/freescale/t208xrdb/eth_t208xrdb.c                       | 1 +
 board/freescale/t208xrdb/spl.c                                | 1 +
 board/freescale/t208xrdb/t208xrdb.c                           | 1 +
 board/freescale/t4rdb/cpld.c                                  | 1 +
 board/freescale/t4rdb/cpld.h                                  | 1 +
 board/freescale/t4rdb/ddr.c                                   | 1 +
 board/freescale/t4rdb/ddr.h                                   | 1 +
 board/freescale/t4rdb/eth.c                                   | 1 +
 board/freescale/t4rdb/spl.c                                   | 1 +
 board/freescale/t4rdb/t4240rdb.c                              | 1 +
 board/friendlyarm/nanopi2/board.c                             | 1 +
 board/friendlyarm/nanopi2/hwrev.c                             | 1 +
 board/friendlyarm/nanopi2/hwrev.h                             | 1 +
 board/gardena/smart-gateway-mt7688/board.c                    | 2 ++
 board/gateworks/gw_ventana/common.c                           | 1 +
 board/gateworks/gw_ventana/eeprom.c                           | 1 +
 board/gateworks/gw_ventana/gsc.c                              | 1 +
 board/gateworks/gw_ventana/gsc.h                              | 1 +
 board/gateworks/gw_ventana/gw_ventana.c                       | 1 +
 board/gateworks/gw_ventana/gw_ventana_spl.c                   | 1 +
 board/gateworks/gw_ventana/ventana_eeprom.h                   | 1 +
 board/gdsys/a38x/controlcenterdc.c                            | 1 +
 board/gdsys/a38x/dt_helpers.c                                 | 1 +
 board/gdsys/a38x/dt_helpers.h                                 | 1 +
 board/gdsys/a38x/hre.c                                        | 2 ++
 board/gdsys/a38x/hre.h                                        | 1 +
 board/gdsys/a38x/hydra.c                                      | 2 ++
 board/gdsys/a38x/hydra.h                                      | 1 +
 board/gdsys/a38x/ihs_phys.c                                   | 2 ++
 board/gdsys/a38x/ihs_phys.h                                   | 1 +
 board/gdsys/a38x/keyprogram.c                                 | 1 +
 board/gdsys/a38x/spl.c                                        | 1 +
 board/gdsys/common/cmd_ioloop.c                               | 2 ++
 board/gdsys/common/dp501.c                                    | 1 +
 board/gdsys/common/dp501.h                                    | 1 +
 board/gdsys/common/fanctrl.h                                  | 1 +
 board/gdsys/common/ihs_mdio.c                                 | 1 +
 board/gdsys/common/ihs_mdio.h                                 | 1 +
 board/gdsys/common/ioep-fpga.c                                | 1 +
 board/gdsys/common/mclink.h                                   | 1 +
 board/gdsys/common/osd.c                                      | 1 +
 board/gdsys/common/osd_cmd.c                                  | 1 +
 board/gdsys/common/phy.c                                      | 1 +
 board/gdsys/mpc8308/hrcon.c                                   | 2 ++
 board/gdsys/mpc8308/mpc8308.c                                 | 1 +
 board/gdsys/mpc8308/mpc8308.h                                 | 1 +
 board/gdsys/mpc8308/strider.c                                 | 2 ++
 board/gdsys/p1022/controlcenterd-id.c                         | 2 ++
 board/gdsys/p1022/controlcenterd.c                            | 1 +
 board/gdsys/p1022/ddr.c                                       | 1 +
 board/gdsys/p1022/diu.c                                       | 1 +
 board/gdsys/p1022/sdhc_boot.c                                 | 1 +
 board/ge/bx50v3/bx50v3.c                                      | 2 ++
 board/ge/common/ge_common.c                                   | 1 +
 board/ge/common/vpd_reader.c                                  | 1 +
 board/ge/common/vpd_reader.h                                  | 1 +
 board/ge/mx53ppd/mx53ppd.c                                    | 1 +
 board/ge/mx53ppd/mx53ppd_video.c                              | 1 +
 board/google/imx8mq_phanbell/spl.c                            | 1 +
 board/grinn/chiliboard/board.c                                | 1 +
 board/grinn/liteboard/board.c                                 | 1 +
 board/highbank/ahci.c                                         | 1 +
 board/highbank/highbank.c                                     | 2 ++
 board/hisilicon/hikey/hikey.c                                 | 1 +
 board/hisilicon/hikey960/hikey960.c                           | 1 +
 board/hisilicon/poplar/poplar.c                               | 1 +
 board/ids/ids8313/ids8313.c                                   | 1 +
 board/imgtec/boston/checkboard.c                              | 1 +
 board/imgtec/boston/ddr.c                                     | 1 +
 board/imgtec/ci20/ci20.c                                      | 2 ++
 board/imgtec/malta/malta.c                                    | 2 ++
 board/imgtec/malta/superio.c                                  | 1 +
 board/intel/edison/edison.c                                   | 1 +
 board/intel/galileo/galileo.c                                 | 1 +
 board/inversepath/usbarmory/usbarmory.c                       | 1 +
 board/iomega/iconnect/iconnect.c                              | 1 +
 board/is1/qts/pinmux_config.h                                 | 1 +
 board/is1/qts/sdram_config.h                                  | 1 +
 board/isee/igep003x/board.c                                   | 1 +
 board/isee/igep00x0/igep00x0.c                                | 1 +
 board/k+p/kp_imx53/kp_id_rev.c                                | 1 +
 board/k+p/kp_imx53/kp_id_rev.h                                | 2 ++
 board/k+p/kp_imx53/kp_imx53.c                                 | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c                     | 1 +
 board/keymile/common/common.c                                 | 1 +
 board/keymile/common/common.h                                 | 1 +
 board/keymile/common/qrio.c                                   | 2 ++
 board/keymile/common/qrio.h                                   | 1 +
 board/keymile/km83xx/km83xx.c                                 | 2 ++
 board/keymile/km83xx/km83xx_i2c.c                             | 1 +
 board/keymile/km_arm/fpga_config.c                            | 1 +
 board/keymile/km_arm/km_arm.c                                 | 1 +
 board/keymile/kmp204x/kmp204x.c                               | 1 +
 board/keymile/kmp204x/pci.c                                   | 1 +
 board/keymile/secu1/qts/pinmux_config.h                       | 1 +
 board/keymile/secu1/qts/sdram_config.h                        | 1 +
 board/keymile/secu1/socfpga.c                                 | 1 +
 board/kmc/kzm9g/kzm9g.c                                       | 1 +
 board/kobol/helios4/helios4.c                                 | 1 +
 board/kosagi/novena/novena.c                                  | 1 +
 board/kosagi/novena/novena_spl.c                              | 1 +
 board/kosagi/novena/video.c                                   | 1 +
 board/laird/wb50n/wb50n.c                                     | 1 +
 board/lego/ev3/legoev3.c                                      | 1 +
 board/lg/sniper/sniper.c                                      | 1 +
 board/liebherr/display5/display5.c                            | 2 ++
 board/liebherr/display5/spl.c                                 | 1 +
 board/liebherr/mccmon6/spl.c                                  | 1 +
 board/liebherr/xea/spl_xea.c                                  | 1 +
 board/liebherr/xea/xea.c                                      | 1 +
 board/logicpd/am3517evm/am3517evm.c                           | 1 +
 board/logicpd/imx6/imx6logic.c                                | 1 +
 board/logicpd/omap3som/omap3logic.c                           | 1 +
 board/menlo/m53menlo/m53menlo.c                               | 1 +
 board/microchip/pic32mzda/pic32mzda.c                         | 1 +
 board/mini-box/picosam9g45/picosam9g45.c                      | 1 +
 board/mpc8308_p1m/sdram.c                                     | 1 +
 board/mscc/common/spi.c                                       | 1 +
 board/mscc/jr2/jr2.c                                          | 2 ++
 board/mscc/luton/luton.c                                      | 1 +
 board/mscc/serval/serval.c                                    | 1 +
 board/netgear/dgnd3700v2/dgnd3700v2.c                         | 1 +
 board/nokia/rx51/rx51.c                                       | 1 +
 board/nokia/rx51/rx51.h                                       | 1 +
 board/nokia/rx51/tag_omap.h                                   | 1 +
 board/nvidia/cardhu/cardhu.c                                  | 1 +
 board/nvidia/dalmore/dalmore.c                                | 1 +
 board/nvidia/e2220-1170/e2220-1170.c                          | 1 +
 board/nvidia/p2371-0000/p2371-0000.c                          | 1 +
 board/nvidia/p2371-2180/p2371-2180.c                          | 1 +
 board/nvidia/p2571/p2571.c                                    | 1 +
 board/nvidia/p2771-0000/p2771-0000.c                          | 1 +
 board/nvidia/p3450-0000/p3450-0000.c                          | 1 +
 board/nvidia/venice2/as3722_init.c                            | 1 +
 board/olimex/mx23_olinuxino/spl_boot.c                        | 1 +
 board/phytec/pcl063/pcl063.c                                  | 1 +
 board/phytec/pcl063/spl.c                                     | 1 +
 board/phytec/pcm052/pcm052.c                                  | 1 +
 board/phytec/pcm058/pcm058.c                                  | 1 +
 board/phytec/pfla02/pfla02.c                                  | 1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c                  | 1 +
 board/phytec/phycore_rk3288/som.h                             | 1 +
 board/phytium/durian/durian.c                                 | 1 +
 board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c        | 1 +
 board/pine64/rockpro64_rk3399/rockpro64-rk3399.c              | 1 +
 board/ppcag/bg0900/spl_boot.c                                 | 1 +
 board/qca/ap121/ap121.c                                       | 1 +
 board/qca/ap143/ap143.c                                       | 1 +
 board/qca/ap152/ap152.c                                       | 1 +
 board/qemu-mips/qemu-mips.c                                   | 1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c              | 1 +
 board/qualcomm/dragonboard820c/dragonboard820c.c              | 1 +
 board/raidsonic/ib62x0/ib62x0.c                               | 1 +
 board/raspberrypi/rpi/rpi.c                                   | 2 ++
 board/renesas/alt/alt.c                                       | 1 +
 board/renesas/alt/alt_spl.c                                   | 1 +
 board/renesas/alt/qos.c                                       | 1 +
 board/renesas/blanche/blanche.c                               | 1 +
 board/renesas/blanche/qos.c                                   | 1 +
 board/renesas/condor/condor.c                                 | 1 +
 board/renesas/draak/draak.c                                   | 1 +
 board/renesas/eagle/eagle.c                                   | 1 +
 board/renesas/ebisu/ebisu.c                                   | 1 +
 board/renesas/gose/gose.c                                     | 1 +
 board/renesas/gose/gose_spl.c                                 | 1 +
 board/renesas/gose/qos.c                                      | 1 +
 board/renesas/grpeach/grpeach.c                               | 1 +
 board/renesas/koelsch/koelsch.c                               | 1 +
 board/renesas/koelsch/koelsch_spl.c                           | 1 +
 board/renesas/koelsch/qos.c                                   | 1 +
 board/renesas/lager/lager.c                                   | 1 +
 board/renesas/lager/lager_spl.c                               | 1 +
 board/renesas/lager/qos.c                                     | 1 +
 board/renesas/porter/porter.c                                 | 1 +
 board/renesas/porter/porter_spl.c                             | 1 +
 board/renesas/porter/qos.c                                    | 1 +
 board/renesas/rcar-common/gen3-spl.c                          | 1 +
 board/renesas/salvator-x/salvator-x.c                         | 1 +
 board/renesas/sh7757lcr/sh7757lcr.c                           | 1 +
 board/renesas/sh7763rdp/sh7763rdp.c                           | 1 +
 board/renesas/silk/qos.c                                      | 1 +
 board/renesas/silk/silk.c                                     | 1 +
 board/renesas/silk/silk_spl.c                                 | 1 +
 board/renesas/stout/cpld.c                                    | 1 +
 board/renesas/stout/qos.c                                     | 1 +
 board/renesas/stout/stout.c                                   | 1 +
 board/renesas/stout/stout_spl.c                               | 1 +
 board/renesas/ulcb/cpld.c                                     | 1 +
 board/renesas/ulcb/ulcb.c                                     | 1 +
 board/rockchip/tinker_rk3288/tinker-rk3288.c                  | 1 +
 board/samsung/arndale/arndale.c                               | 1 +
 board/samsung/common/board.c                                  | 2 ++
 board/samsung/common/exynos5-dt-types.c                       | 2 ++
 board/samsung/common/exynos5-dt.c                             | 1 +
 board/samsung/common/misc.c                                   | 1 +
 board/samsung/goni/goni.c                                     | 1 +
 board/samsung/origen/origen.c                                 | 1 +
 board/samsung/smdkc100/smdkc100.c                             | 1 +
 board/samsung/smdkv310/smdkv310.c                             | 1 +
 board/samsung/trats/trats.c                                   | 1 +
 board/samsung/trats2/trats2.c                                 | 1 +
 board/samsung/universal_c210/universal.c                      | 1 +
 board/sandbox/sandbox.c                                       | 1 +
 board/sandisk/sansa_fuze_plus/sfp.c                           | 1 +
 board/sandisk/sansa_fuze_plus/spl_boot.c                      | 1 +
 board/sbc8349/sbc8349.c                                       | 1 +
 board/sbc8548/ddr.c                                           | 2 ++
 board/sbc8548/sbc8548.c                                       | 1 +
 board/sbc8641d/sbc8641d.c                                     | 1 +
 board/schulercontrol/sc_sps_1/spl_boot.c                      | 1 +
 board/seco/mx6quq7/mx6quq7.c                                  | 1 +
 board/seeed/linkit-smart-7688/board.c                         | 1 +
 board/siemens/capricorn/board.c                               | 2 ++
 board/siemens/capricorn/spl.c                                 | 1 +
 board/siemens/common/factoryset.c                             | 1 +
 board/siemens/common/factoryset.h                             | 1 +
 board/siemens/corvus/board.c                                  | 1 +
 board/siemens/draco/board.c                                   | 1 +
 board/siemens/pxm2/board.c                                    | 1 +
 board/siemens/rut/board.c                                     | 2 ++
 board/sifive/fu540/fu540.c                                    | 1 +
 board/sifive/fu540/spl.c                                      | 1 +
 board/sks-kinkel/sksimx6/sksimx6.c                            | 1 +
 board/socrates/nand.c                                         | 1 +
 board/socrates/sdram.c                                        | 2 ++
 board/socrates/socrates.c                                     | 1 +
 board/softing/vining_2000/vining_2000.c                       | 2 ++
 board/softing/vining_fpga/qts/pinmux_config.h                 | 1 +
 board/softing/vining_fpga/qts/sdram_config.h                  | 1 +
 board/softing/vining_fpga/socfpga.c                           | 1 +
 board/solidrun/clearfog/clearfog.c                            | 2 ++
 board/solidrun/common/tlv_data.c                              | 2 ++
 board/solidrun/mx6cuboxi/mx6cuboxi.c                          | 2 ++
 board/spear/spear300/spear300.c                               | 1 +
 board/spear/spear310/spear310.c                               | 1 +
 board/spear/spear320/spear320.c                               | 1 +
 board/spear/spear600/spear600.c                               | 1 +
 board/spear/x600/fpga.c                                       | 1 +
 board/sr1500/qts/pinmux_config.h                              | 1 +
 board/sr1500/qts/sdram_config.h                               | 1 +
 board/st/common/stm32mp_dfu.c                                 | 2 ++
 board/st/common/stpmic1.c                                     | 1 +
 board/st/common/stpmic1.h                                     | 1 +
 board/st/stm32f429-discovery/stm32f429-discovery.c            | 1 +
 board/st/stm32f429-evaluation/stm32f429-evaluation.c          | 1 +
 board/st/stm32f469-discovery/stm32f469-discovery.c            | 1 +
 board/st/stm32f746-disco/stm32f746-disco.c                    | 1 +
 board/st/stm32h743-disco/stm32h743-disco.c                    | 1 +
 board/st/stm32h743-eval/stm32h743-eval.c                      | 1 +
 board/st/stm32mp1/spl.c                                       | 1 +
 board/st/stm32mp1/stm32mp1.c                                  | 2 ++
 board/st/stv0991/stv0991.c                                    | 1 +
 board/sunxi/board.c                                           | 1 +
 board/synopsys/axs10x/axs10x.c                                | 2 ++
 board/synopsys/emsdp/emsdp.c                                  | 1 +
 board/synopsys/hsdk/clk-lib.c                                 | 1 +
 board/synopsys/hsdk/clk-lib.h                                 | 1 +
 board/synopsys/hsdk/env-lib.h                                 | 1 +
 board/synopsys/hsdk/hsdk.c                                    | 3 +++
 board/synopsys/iot_devkit/iot_devkit.c                        | 1 +
 board/sysam/amcore/amcore.c                                   | 1 +
 board/sysam/stmark2/stmark2.c                                 | 1 +
 board/tbs/tbs2910/tbs2910.c                                   | 1 +
 board/tcl/sl50/board.c                                        | 1 +
 board/technexion/pico-imx6/pico-imx6.c                        | 1 +
 board/technexion/pico-imx6/spl.c                              | 1 +
 board/technexion/pico-imx6ul/pico-imx6ul.c                    | 1 +
 board/technexion/pico-imx6ul/spl.c                            | 1 +
 board/technexion/pico-imx7d/spl.c                             | 2 ++
 board/technexion/pico-imx8mq/spl.c                            | 1 +
 board/technologic/ts4600/iomux.c                              | 1 +
 board/technologic/ts4800/ts4800.c                             | 1 +
 board/technologic/ts4800/ts4800.h                             | 1 +
 board/terasic/de0-nano-soc/qts/pinmux_config.h                | 1 +
 board/terasic/de0-nano-soc/qts/sdram_config.h                 | 1 +
 board/terasic/de1-soc/qts/pinmux_config.h                     | 1 +
 board/terasic/de1-soc/qts/sdram_config.h                      | 1 +
 board/terasic/de1-soc/socfpga.c                               | 1 +
 board/terasic/de10-nano/qts/pinmux_config.h                   | 1 +
 board/terasic/de10-nano/qts/sdram_config.h                    | 1 +
 board/terasic/sockit/qts/pinmux_config.h                      | 1 +
 board/terasic/sockit/qts/sdram_config.h                       | 1 +
 board/theadorable/fpga.c                                      | 1 +
 board/theadorable/theadorable.c                               | 1 +
 board/theobroma-systems/puma_rk3399/puma-rk3399.c             | 1 +
 board/ti/am335x/board.c                                       | 1 +
 board/ti/am43xx/board.c                                       | 2 ++
 board/ti/am57xx/board.c                                       | 2 ++
 board/ti/am65x/evm.c                                          | 1 +
 board/ti/beagle/beagle.c                                      | 1 +
 board/ti/common/board_detect.c                                | 3 +++
 board/ti/common/board_detect.h                                | 2 ++
 board/ti/dra7xx/evm.c                                         | 1 +
 board/ti/evm/evm.c                                            | 1 +
 board/ti/evm/evm.h                                            | 1 +
 board/ti/j721e/evm.c                                          | 2 ++
 board/ti/ks2_evm/board.c                                      | 2 ++
 board/ti/ks2_evm/board_k2e.c                                  | 1 +
 board/ti/ks2_evm/board_k2g.c                                  | 1 +
 board/ti/ks2_evm/board_k2hk.c                                 | 1 +
 board/ti/ks2_evm/board_k2l.c                                  | 1 +
 board/ti/ks2_evm/ddr3_k2e.c                                   | 1 +
 board/ti/ks2_evm/ddr3_k2g.c                                   | 1 +
 board/ti/ks2_evm/ddr3_k2hk.c                                  | 1 +
 board/ti/ks2_evm/ddr3_k2l.c                                   | 1 +
 board/ti/omap5_uevm/evm.c                                     | 1 +
 board/ti/panda/panda.c                                        | 1 +
 board/ti/sdp4430/sdp.c                                        | 1 +
 board/ti/ti816x/evm.c                                         | 1 +
 board/timll/devkit3250/devkit3250_spl.c                       | 1 +
 board/timll/devkit8000/devkit8000.c                           | 1 +
 board/toradex/apalis-imx8/apalis-imx8.c                       | 1 +
 board/toradex/apalis-tk1/apalis-tk1.c                         | 1 +
 board/toradex/apalis-tk1/as3722_init.c                        | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c                       | 1 +
 board/toradex/apalis_imx6/pf0100.c                            | 1 +
 board/toradex/apalis_t30/apalis_t30.c                         | 1 +
 board/toradex/colibri-imx8x/colibri-imx8x.c                   | 1 +
 board/toradex/colibri_imx6/colibri_imx6.c                     | 1 +
 board/toradex/colibri_imx6/pf0100.c                           | 1 +
 board/toradex/colibri_imx7/colibri_imx7.c                     | 1 +
 board/toradex/colibri_t20/colibri_t20.c                       | 1 +
 board/toradex/colibri_vf/colibri_vf.c                         | 1 +
 board/toradex/common/tdx-cfg-block.c                          | 2 ++
 board/toradex/common/tdx-common.c                             | 1 +
 board/toradex/verdin-imx8mm/spl.c                             | 1 +
 board/tplink/wdr4300/wdr4300.c                                | 1 +
 board/tqc/tqm834x/pci.c                                       | 1 +
 board/tqc/tqm834x/tqm834x.c                                   | 1 +
 board/tqc/tqma6/tqma6.c                                       | 2 ++
 board/udoo/neo/neo.c                                          | 1 +
 board/udoo/udoo.c                                             | 1 +
 board/udoo/udoo_spl.c                                         | 1 +
 board/variscite/dart_6ul/spl.c                                | 1 +
 board/varisys/common/sys_eeprom.c                             | 2 ++
 board/varisys/cyrus/cyrus.c                                   | 1 +
 board/varisys/cyrus/ddr.c                                     | 1 +
 board/ve8313/ve8313.c                                         | 1 +
 board/vscom/baltos/board.c                                    | 1 +
 board/vscom/baltos/board.h                                    | 1 +
 board/wandboard/spl.c                                         | 1 +
 board/wandboard/wandboard.c                                   | 2 ++
 board/work-microwave/work_92105/work_92105_display.c          | 1 +
 board/work-microwave/work_92105/work_92105_spl.c              | 1 +
 board/xes/common/actl_nand.c                                  | 1 +
 board/xes/common/fsl_8xxx_clk.c                               | 1 +
 board/xes/common/fsl_8xxx_misc.c                              | 1 +
 board/xes/common/fsl_8xxx_misc.h                              | 1 +
 board/xes/common/fsl_8xxx_pci.c                               | 1 +
 board/xes/xpedite517x/ddr.c                                   | 1 +
 board/xes/xpedite520x/ddr.c                                   | 1 +
 board/xes/xpedite537x/ddr.c                                   | 1 +
 board/xes/xpedite550x/ddr.c                                   | 1 +
 board/xilinx/common/board.c                                   | 1 +
 board/xilinx/microblaze-generic/microblaze-generic.c          | 1 +
 board/xilinx/versal/board.c                                   | 1 +
 board/xilinx/zynq/bootimg.c                                   | 1 +
 board/xilinx/zynq/cmds.c                                      | 2 ++
 board/xilinx/zynqmp/cmds.c                                    | 1 +
 board/xilinx/zynqmp/pm_cfg_obj.h                              | 1 +
 board/xilinx/zynqmp/tap_delays.c                              | 1 +
 board/xilinx/zynqmp/zynqmp.c                                  | 2 ++
 board/zyxel/nsa310s/nsa310s.c                                 | 1 +
 cmd/abootimg.c                                                | 1 +
 cmd/acpi.c                                                    | 1 +
 cmd/adtimg.c                                                  | 1 +
 cmd/aes.c                                                     | 1 +
 cmd/armflash.c                                                | 1 +
 cmd/avb.c                                                     | 2 ++
 cmd/axi.c                                                     | 1 +
 cmd/bcb.c                                                     | 1 +
 cmd/bdinfo.c                                                  | 2 ++
 cmd/bedbug.c                                                  | 1 +
 cmd/binop.c                                                   | 1 +
 cmd/blk_common.c                                              | 1 +
 cmd/blob.c                                                    | 2 ++
 cmd/bmp.c                                                     | 2 ++
 cmd/boot.c                                                    | 1 +
 cmd/bootefi.c                                                 | 1 +
 cmd/booti.c                                                   | 1 +
 cmd/bootm.c                                                   | 1 +
 cmd/bootstage.c                                               | 1 +
 cmd/bootz.c                                                   | 2 ++
 cmd/cache.c                                                   | 1 +
 cmd/cbfs.c                                                    | 1 +
 cmd/clk.c                                                     | 2 ++
 cmd/cpu.c                                                     | 1 +
 cmd/cramfs.c                                                  | 1 +
 cmd/cros_ec.c                                                 | 1 +
 cmd/demo.c                                                    | 1 +
 cmd/disk.c                                                    | 1 +
 cmd/eeprom.c                                                  | 2 ++
 cmd/efi.c                                                     | 2 ++
 cmd/efidebug.c                                                | 1 +
 cmd/elf.c                                                     | 1 +
 cmd/fastboot.c                                                | 1 +
 cmd/fat.c                                                     | 1 +
 cmd/flash.c                                                   | 1 +
 cmd/fpga.c                                                    | 1 +
 cmd/fpgad.c                                                   | 1 +
 cmd/fuse.c                                                    | 1 +
 cmd/gpio.c                                                    | 2 ++
 cmd/gpt.c                                                     | 2 ++
 cmd/i2c.c                                                     | 2 ++
 cmd/ini.c                                                     | 1 +
 cmd/io.c                                                      | 1 +
 cmd/iotrace.c                                                 | 1 +
 cmd/itest.c                                                   | 1 +
 cmd/jffs2.c                                                   | 1 +
 cmd/legacy-mtd-utils.c                                        | 1 +
 cmd/legacy-mtd-utils.h                                        | 1 +
 cmd/legacy_led.c                                              | 1 +
 cmd/load.c                                                    | 1 +
 cmd/log.c                                                     | 1 +
 cmd/lzmadec.c                                                 | 1 +
 cmd/md5sum.c                                                  | 1 +
 cmd/mdio.c                                                    | 1 +
 cmd/mem.c                                                     | 2 ++
 cmd/mii.c                                                     | 2 ++
 cmd/misc.c                                                    | 1 +
 cmd/mmc.c                                                     | 2 ++
 cmd/mtd.c                                                     | 2 ++
 cmd/mtdparts.c                                                | 1 +
 cmd/mvebu/bubt.c                                              | 1 +
 cmd/nand.c                                                    | 1 +
 cmd/net.c                                                     | 1 +
 cmd/nvedit.c                                                  | 2 ++
 cmd/nvedit_efi.c                                              | 2 ++
 cmd/onenand.c                                                 | 1 +
 cmd/osd.c                                                     | 1 +
 cmd/pcap.c                                                    | 1 +
 cmd/pci.c                                                     | 2 ++
 cmd/pmic.c                                                    | 1 +
 cmd/pxe_utils.c                                               | 2 ++
 cmd/pxe_utils.h                                               | 1 +
 cmd/qfw.c                                                     | 1 +
 cmd/read.c                                                    | 1 +
 cmd/regulator.c                                               | 1 +
 cmd/reiser.c                                                  | 1 +
 cmd/remoteproc.c                                              | 1 +
 cmd/rng.c                                                     | 1 +
 cmd/rtc.c                                                     | 1 +
 cmd/setexpr.c                                                 | 1 +
 cmd/sf.c                                                      | 2 ++
 cmd/source.c                                                  | 1 +
 cmd/spi.c                                                     | 1 +
 cmd/ti/ddr3.c                                                 | 1 +
 cmd/time.c                                                    | 1 +
 cmd/tlv_eeprom.c                                              | 2 ++
 cmd/tpm-common.c                                              | 1 +
 cmd/tpm-user-utils.h                                          | 1 +
 cmd/tpm-v1.c                                                  | 1 +
 cmd/tpm-v2.c                                                  | 1 +
 cmd/tpm_test.c                                                | 1 +
 cmd/trace.c                                                   | 1 +
 cmd/tsi148.c                                                  | 1 +
 cmd/ubi.c                                                     | 2 ++
 cmd/ubifs.c                                                   | 1 +
 cmd/universe.c                                                | 1 +
 cmd/unlz4.c                                                   | 1 +
 cmd/usb.c                                                     | 1 +
 cmd/usb_mass_storage.c                                        | 1 +
 cmd/version.c                                                 | 1 +
 cmd/w1.c                                                      | 1 +
 cmd/wdt.c                                                     | 1 +
 cmd/wol.c                                                     | 1 +
 cmd/x86/fsp.c                                                 | 1 +
 cmd/x86/hob.c                                                 | 1 +
 cmd/x86/mtrr.c                                                | 1 +
 cmd/ximg.c                                                    | 1 +
 cmd/yaffs2.c                                                  | 1 +
 cmd/zfs.c                                                     | 1 +
 common/android_ab.c                                           | 2 ++
 common/autoboot.c                                             | 1 +
 common/avb_verify.c                                           | 2 ++
 common/bloblist.c                                             | 2 ++
 common/board_f.c                                              | 3 +++
 common/board_info.c                                           | 1 +
 common/board_r.c                                              | 2 ++
 common/bootm.c                                                | 3 +++
 common/bootm_os.c                                             | 3 +++
 common/bootretry.c                                            | 1 +
 common/bootstage.c                                            | 1 +
 common/bouncebuf.c                                            | 1 +
 common/cli.c                                                  | 1 +
 common/cli_hush.c                                             | 1 +
 common/cli_readline.c                                         | 1 +
 common/command.c                                              | 1 +
 common/common_fit.c                                           | 1 +
 common/console.c                                              | 1 +
 common/ddr_spd.c                                              | 1 +
 common/dlmalloc.c                                             | 1 +
 common/edid.c                                                 | 2 ++
 common/eeprom/eeprom_layout.c                                 | 1 +
 common/fdt_region.c                                           | 1 +
 common/fdt_support.c                                          | 1 +
 common/flash.c                                                | 1 +
 common/hash.c                                                 | 2 ++
 common/hwconfig.c                                             | 1 +
 common/image-android-dt.c                                     | 1 +
 common/image-android.c                                        | 2 ++
 common/image-cipher.c                                         | 1 +
 common/image-fdt.c                                            | 2 ++
 common/image-fit-sig.c                                        | 2 ++
 common/image-fit.c                                            | 1 +
 common/image-sig.c                                            | 1 +
 common/image.c                                                | 2 ++
 common/init/board_init.c                                      | 2 ++
 common/iotrace.c                                              | 1 +
 common/lcd.c                                                  | 1 +
 common/lcd_console.c                                          | 2 ++
 common/lcd_console_rotation.c                                 | 1 +
 common/lcd_simplefb.c                                         | 1 +
 common/log.c                                                  | 1 +
 common/log_syslog.c                                           | 1 +
 common/malloc_simple.c                                        | 1 +
 common/memsize.c                                              | 1 +
 common/s_record.c                                             | 1 +
 common/spl/spl.c                                              | 3 +++
 common/spl/spl_atf.c                                          | 2 ++
 common/spl/spl_bootrom.c                                      | 1 +
 common/spl/spl_ext.c                                          | 1 +
 common/spl/spl_fat.c                                          | 1 +
 common/spl/spl_fit.c                                          | 2 ++
 common/spl/spl_legacy.c                                       | 1 +
 common/spl/spl_mmc.c                                          | 2 ++
 common/spl/spl_nand.c                                         | 2 ++
 common/spl/spl_net.c                                          | 1 +
 common/spl/spl_nor.c                                          | 2 ++
 common/spl/spl_opensbi.c                                      | 1 +
 common/spl/spl_ram.c                                          | 1 +
 common/spl/spl_sata.c                                         | 1 +
 common/spl/spl_spi.c                                          | 2 ++
 common/spl/spl_ymodem.c                                       | 1 +
 common/splash.c                                               | 2 ++
 common/splash_source.c                                        | 2 ++
 common/stdio.c                                                | 1 +
 common/update.c                                               | 1 +
 common/usb.c                                                  | 2 ++
 common/usb_hub.c                                              | 3 +++
 common/usb_kbd.c                                              | 1 +
 common/usb_storage.c                                          | 1 +
 common/xyzModem.c                                             | 1 +
 disk/part.c                                                   | 1 +
 disk/part_amiga.c                                             | 1 +
 disk/part_amiga.h                                             | 1 +
 disk/part_dos.c                                               | 1 +
 disk/part_efi.c                                               | 1 +
 disk/part_iso.c                                               | 1 +
 disk/part_mac.c                                               | 1 +
 disk/part_mac.h                                               | 1 +
 drivers/adc/meson-saradc.c                                    | 2 ++
 drivers/adc/rockchip-saradc.c                                 | 1 +
 drivers/adc/stm32-adc-core.c                                  | 1 +
 drivers/adc/stm32-adc-core.h                                  | 1 +
 drivers/adc/stm32-adc.c                                       | 2 ++
 drivers/ata/ahci.c                                            | 2 ++
 drivers/ata/ahci_mvebu.c                                      | 2 ++
 drivers/ata/ahci_sunxi.c                                      | 1 +
 drivers/ata/dwc_ahci.c                                        | 1 +
 drivers/ata/dwc_ahsata.c                                      | 2 ++
 drivers/ata/fsl_sata.c                                        | 2 ++
 drivers/ata/fsl_sata.h                                        | 1 +
 drivers/ata/libata.c                                          | 1 +
 drivers/ata/mvsata_ide.c                                      | 1 +
 drivers/ata/sata.c                                            | 1 +
 drivers/ata/sata_ceva.c                                       | 1 +
 drivers/ata/sata_mv.c                                         | 1 +
 drivers/ata/sata_sandbox.c                                    | 1 +
 drivers/ata/sata_sil.c                                        | 1 +
 drivers/ata/sata_sil.h                                        | 1 +
 drivers/ata/sata_sil3114.c                                    | 1 +
 drivers/axi/axi-emul-uclass.c                                 | 1 +
 drivers/axi/axi-uclass.c                                      | 1 +
 drivers/axi/axi_sandbox.c                                     | 1 +
 drivers/axi/ihs_axi.c                                         | 1 +
 drivers/axi/sandbox_store.c                                   | 1 +
 drivers/bios_emulator/atibios.c                               | 1 +
 drivers/bios_emulator/besys.c                                 | 1 +
 drivers/bios_emulator/bios.c                                  | 1 +
 drivers/bios_emulator/biosemu.c                               | 1 +
 drivers/bios_emulator/include/biosemu.h                       | 1 +
 drivers/bios_emulator/include/x86emu/debug.h                  | 1 +
 drivers/bios_emulator/include/x86emu/decode.h                 | 1 +
 drivers/bios_emulator/include/x86emu/ops.h                    | 1 +
 drivers/bios_emulator/include/x86emu/prim_ops.h               | 1 +
 drivers/bios_emulator/include/x86emu/regs.h                   | 1 +
 drivers/bios_emulator/x86emu/debug.c                          | 1 +
 drivers/bios_emulator/x86emu/decode.c                         | 1 +
 drivers/bios_emulator/x86emu/ops.c                            | 1 +
 drivers/bios_emulator/x86emu/ops2.c                           | 1 +
 drivers/bios_emulator/x86emu/prim_ops.c                       | 1 +
 drivers/bios_emulator/x86emu/sys.c                            | 1 +
 drivers/block/blk-uclass.c                                    | 2 ++
 drivers/block/blk_legacy.c                                    | 2 ++
 drivers/block/ide.c                                           | 2 ++
 drivers/block/sandbox.c                                       | 1 +
 drivers/board/board-uclass.c                                  | 1 +
 drivers/board/sandbox.c                                       | 2 ++
 drivers/bootcount/bootcount-uclass.c                          | 1 +
 drivers/bootcount/bootcount.c                                 | 3 +++
 drivers/bootcount/bootcount_at91.c                            | 1 +
 drivers/bootcount/bootcount_davinci.c                         | 1 +
 drivers/bootcount/bootcount_env.c                             | 1 +
 drivers/bootcount/bootcount_ext.c                             | 1 +
 drivers/bootcount/bootcount_i2c.c                             | 1 +
 drivers/bootcount/bootcount_ram.c                             | 1 +
 drivers/bootcount/i2c-eeprom.c                                | 1 +
 drivers/bootcount/rtc.c                                       | 1 +
 drivers/bus/uniphier-system-bus.c                             | 1 +
 drivers/cache/cache-l2x0.c                                    | 1 +
 drivers/cache/cache-ncore.c                                   | 2 ++
 drivers/cache/cache-v5l2.c                                    | 2 ++
 drivers/clk/altera/clk-agilex.c                               | 2 ++
 drivers/clk/altera/clk-agilex.h                               | 1 +
 drivers/clk/altera/clk-arria10.c                              | 2 ++
 drivers/clk/analogbits/wrpll-cln28hpc.c                       | 1 +
 drivers/clk/aspeed/clk_ast2500.c                              | 2 ++
 drivers/clk/at91/clk-generated.c                              | 1 +
 drivers/clk/at91/clk-h32mx.c                                  | 1 +
 drivers/clk/at91/clk-main.c                                   | 1 +
 drivers/clk/at91/clk-master.c                                 | 1 +
 drivers/clk/at91/clk-peripheral.c                             | 1 +
 drivers/clk/at91/clk-plla.c                                   | 1 +
 drivers/clk/at91/clk-plladiv.c                                | 1 +
 drivers/clk/at91/clk-slow.c                                   | 1 +
 drivers/clk/at91/clk-system.c                                 | 1 +
 drivers/clk/at91/clk-usb.c                                    | 1 +
 drivers/clk/at91/clk-utmi.c                                   | 1 +
 drivers/clk/clk-cdce9xx.c                                     | 1 +
 drivers/clk/clk-composite.c                                   | 1 +
 drivers/clk/clk-divider.c                                     | 3 +++
 drivers/clk/clk-fixed-factor.c                                | 1 +
 drivers/clk/clk-gate.c                                        | 2 ++
 drivers/clk/clk-hsdk-cgu.c                                    | 3 +++
 drivers/clk/clk-mux.c                                         | 2 ++
 drivers/clk/clk-ti-sci.c                                      | 1 +
 drivers/clk/clk-uclass.c                                      | 2 ++
 drivers/clk/clk.c                                             | 1 +
 drivers/clk/clk_bcm6345.c                                     | 1 +
 drivers/clk/clk_boston.c                                      | 1 +
 drivers/clk/clk_fixed_factor.c                                | 1 +
 drivers/clk/clk_fixed_rate.c                                  | 1 +
 drivers/clk/clk_pic32.c                                       | 2 ++
 drivers/clk/clk_sandbox.c                                     | 1 +
 drivers/clk/clk_sandbox_ccf.c                                 | 3 +++
 drivers/clk/clk_sandbox_test.c                                | 1 +
 drivers/clk/clk_stm32f.c                                      | 2 ++
 drivers/clk/clk_stm32h7.c                                     | 1 +
 drivers/clk/clk_stm32mp1.c                                    | 3 +++
 drivers/clk/clk_versal.c                                      | 1 +
 drivers/clk/clk_vexpress_osc.c                                | 1 +
 drivers/clk/clk_zynq.c                                        | 2 ++
 drivers/clk/clk_zynqmp.c                                      | 2 ++
 drivers/clk/exynos/clk-exynos7420.c                           | 1 +
 drivers/clk/exynos/clk-pll.c                                  | 1 +
 drivers/clk/ics8n3qv01.c                                      | 1 +
 drivers/clk/imx/clk-composite-8m.c                            | 2 ++
 drivers/clk/imx/clk-gate2.c                                   | 2 ++
 drivers/clk/imx/clk-imx6q.c                                   | 2 ++
 drivers/clk/imx/clk-imx8.c                                    | 2 ++
 drivers/clk/imx/clk-imx8.h                                    | 1 +
 drivers/clk/imx/clk-imx8mm.c                                  | 3 +++
 drivers/clk/imx/clk-imx8mn.c                                  | 3 +++
 drivers/clk/imx/clk-imx8mp.c                                  | 3 +++
 drivers/clk/imx/clk-imx8qm.c                                  | 2 ++
 drivers/clk/imx/clk-imx8qxp.c                                 | 2 ++
 drivers/clk/imx/clk-imxrt1020.c                               | 2 ++
 drivers/clk/imx/clk-imxrt1050.c                               | 2 ++
 drivers/clk/imx/clk-pfd.c                                     | 2 ++
 drivers/clk/imx/clk-pll14xx.c                                 | 3 +++
 drivers/clk/imx/clk-pllv3.c                                   | 3 +++
 drivers/clk/imx/clk.h                                         | 2 ++
 drivers/clk/intel/clk_intel.c                                 | 1 +
 drivers/clk/kendryte/bypass.c                                 | 1 +
 drivers/clk/kendryte/clk.c                                    | 2 ++
 drivers/clk/kendryte/pll.c                                    | 3 +++
 drivers/clk/mediatek/clk-mt7622.c                             | 1 +
 drivers/clk/mediatek/clk-mt7623.c                             | 1 +
 drivers/clk/mediatek/clk-mt7629.c                             | 1 +
 drivers/clk/mediatek/clk-mtk.c                                | 2 ++
 drivers/clk/mediatek/clk-mtk.h                                | 2 ++
 drivers/clk/meson/axg.c                                       | 2 ++
 drivers/clk/meson/clk_meson.h                                 | 1 +
 drivers/clk/meson/g12a.c                                      | 2 ++
 drivers/clk/meson/gxbb.c                                      | 2 ++
 drivers/clk/mpc83xx_clk.c                                     | 2 ++
 drivers/clk/mpc83xx_clk.h                                     | 1 +
 drivers/clk/mtmips/clk-mt7628.c                               | 2 ++
 drivers/clk/mvebu/armada-37xx-periph.c                        | 3 +++
 drivers/clk/mvebu/armada-37xx-tbg.c                           | 2 ++
 drivers/clk/owl/clk_owl.c                                     | 1 +
 drivers/clk/owl/clk_owl.h                                     | 1 +
 drivers/clk/renesas/clk-rcar-gen2.c                           | 1 +
 drivers/clk/renesas/clk-rcar-gen3.c                           | 1 +
 drivers/clk/renesas/r8a774a1-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a7791-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a7792-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a7794-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a7795-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c                        | 1 +
 drivers/clk/renesas/r8a77965-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/r8a77970-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/r8a77990-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/r8a77995-cpg-mssr.c                       | 1 +
 drivers/clk/renesas/rcar-gen2-cpg.h                           | 1 +
 drivers/clk/renesas/rcar-gen3-cpg.h                           | 2 ++
 drivers/clk/renesas/renesas-cpg-mssr.c                        | 2 ++
 drivers/clk/renesas/renesas-cpg-mssr.h                        | 2 ++
 drivers/clk/rockchip/clk_pll.c                                | 2 ++
 drivers/clk/rockchip/clk_px30.c                               | 1 +
 drivers/clk/rockchip/clk_rk3036.c                             | 1 +
 drivers/clk/rockchip/clk_rk3128.c                             | 1 +
 drivers/clk/rockchip/clk_rk3188.c                             | 2 ++
 drivers/clk/rockchip/clk_rk322x.c                             | 1 +
 drivers/clk/rockchip/clk_rk3288.c                             | 2 ++
 drivers/clk/rockchip/clk_rk3308.c                             | 1 +
 drivers/clk/rockchip/clk_rk3328.c                             | 1 +
 drivers/clk/rockchip/clk_rk3368.c                             | 1 +
 drivers/clk/rockchip/clk_rk3399.c                             | 1 +
 drivers/clk/rockchip/clk_rv1108.c                             | 1 +
 drivers/clk/sifive/fu540-prci.c                               | 2 ++
 drivers/clk/sunxi/clk_a10.c                                   | 1 +
 drivers/clk/sunxi/clk_a10s.c                                  | 1 +
 drivers/clk/sunxi/clk_a23.c                                   | 1 +
 drivers/clk/sunxi/clk_a31.c                                   | 1 +
 drivers/clk/sunxi/clk_a64.c                                   | 1 +
 drivers/clk/sunxi/clk_a80.c                                   | 1 +
 drivers/clk/sunxi/clk_a83t.c                                  | 1 +
 drivers/clk/sunxi/clk_h3.c                                    | 1 +
 drivers/clk/sunxi/clk_h6.c                                    | 1 +
 drivers/clk/sunxi/clk_r40.c                                   | 1 +
 drivers/clk/sunxi/clk_sunxi.c                                 | 2 ++
 drivers/clk/sunxi/clk_v3s.c                                   | 1 +
 drivers/clk/tegra/tegra-car-clk.c                             | 1 +
 drivers/clk/tegra/tegra186-clk.c                              | 1 +
 drivers/clk/uniphier/clk-uniphier-core.c                      | 2 ++
 drivers/core/acpi.c                                           | 1 +
 drivers/core/device-remove.c                                  | 1 +
 drivers/core/device.c                                         | 2 ++
 drivers/core/devres.c                                         | 2 ++
 drivers/core/dump.c                                           | 1 +
 drivers/core/fdtaddr.c                                        | 1 +
 drivers/core/of_access.c                                      | 2 ++
 drivers/core/of_addr.c                                        | 1 +
 drivers/core/of_extra.c                                       | 1 +
 drivers/core/ofnode.c                                         | 2 ++
 drivers/core/read.c                                           | 1 +
 drivers/core/regmap.c                                         | 1 +
 drivers/core/root.c                                           | 3 +++
 drivers/core/simple-bus.c                                     | 1 +
 drivers/core/syscon-uclass.c                                  | 1 +
 drivers/core/uclass.c                                         | 1 +
 drivers/cpu/bmips_cpu.c                                       | 2 ++
 drivers/cpu/imx8_cpu.c                                        | 1 +
 drivers/cpu/mpc83xx_cpu.c                                     | 1 +
 drivers/cpu/riscv_cpu.c                                       | 1 +
 drivers/crypto/ace_sha.h                                      | 1 +
 drivers/crypto/fsl/desc.h                                     | 2 ++
 drivers/crypto/fsl/desc_constr.h                              | 1 +
 drivers/crypto/fsl/error.c                                    | 1 +
 drivers/crypto/fsl/fsl_blob.c                                 | 1 +
 drivers/crypto/fsl/fsl_hash.c                                 | 1 +
 drivers/crypto/fsl/fsl_hash.h                                 | 1 +
 drivers/crypto/fsl/fsl_rsa.c                                  | 1 +
 drivers/crypto/fsl/jobdesc.c                                  | 1 +
 drivers/crypto/fsl/jobdesc.h                                  | 1 +
 drivers/crypto/fsl/jr.c                                       | 2 ++
 drivers/crypto/fsl/jr.h                                       | 2 ++
 drivers/crypto/fsl/rng.c                                      | 1 +
 drivers/crypto/fsl/rsa_caam.h                                 | 1 +
 drivers/crypto/fsl/sec.c                                      | 2 ++
 drivers/crypto/rsa_mod_exp/mod_exp_sw.c                       | 1 +
 drivers/crypto/rsa_mod_exp/mod_exp_uclass.c                   | 1 +
 drivers/ddr/altera/sdram_agilex.c                             | 1 +
 drivers/ddr/altera/sdram_arria10.c                            | 1 +
 drivers/ddr/altera/sdram_gen5.c                               | 1 +
 drivers/ddr/altera/sdram_s10.c                                | 1 +
 drivers/ddr/altera/sdram_soc64.c                              | 2 ++
 drivers/ddr/altera/sdram_soc64.h                              | 2 ++
 drivers/ddr/altera/sequencer.c                                | 2 ++
 drivers/ddr/altera/sequencer.h                                | 1 +
 drivers/ddr/fsl/arm_ddr_gen3.c                                | 2 ++
 drivers/ddr/fsl/ctrl_regs.c                                   | 3 +++
 drivers/ddr/fsl/ddr3_dimm_params.c                            | 1 +
 drivers/ddr/fsl/ddr4_dimm_params.c                            | 1 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                                | 2 ++
 drivers/ddr/fsl/fsl_mmdc.c                                    | 1 +
 drivers/ddr/fsl/interactive.c                                 | 1 +
 drivers/ddr/fsl/main.c                                        | 3 +++
 drivers/ddr/fsl/mpc85xx_ddr_gen1.c                            | 1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen2.c                            | 2 ++
 drivers/ddr/fsl/mpc85xx_ddr_gen3.c                            | 2 ++
 drivers/ddr/fsl/mpc86xx_ddr.c                                 | 1 +
 drivers/ddr/fsl/options.c                                     | 2 ++
 drivers/ddr/fsl/util.c                                        | 2 ++
 drivers/ddr/imx/imx8m/ddr_init.c                              | 1 +
 drivers/ddr/imx/imx8m/ddrphy_csr.c                            | 1 +
 drivers/ddr/imx/imx8m/ddrphy_utils.c                          | 1 +
 drivers/ddr/imx/imx8m/helper.c                                | 1 +
 drivers/ddr/marvell/a38x/ddr3_logging_def.h                   | 1 +
 drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h                | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h              | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h    | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_db.h                | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h               | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_leveling.h             | 1 +
 drivers/ddr/marvell/a38x/ddr_ml_wrapper.h                     | 1 +
 drivers/ddr/marvell/a38x/mv_ddr_common.h                      | 1 +
 drivers/ddr/marvell/a38x/seq_exec.h                           | 1 +
 drivers/ddr/marvell/a38x/xor.h                                | 1 +
 drivers/ddr/marvell/axp/ddr3_dfs.c                            | 1 +
 drivers/ddr/marvell/axp/ddr3_dqs.c                            | 1 +
 drivers/ddr/marvell/axp/ddr3_hw_training.c                    | 1 +
 drivers/ddr/marvell/axp/ddr3_init.c                           | 2 ++
 drivers/ddr/marvell/axp/ddr3_patterns_64bit.h                 | 1 +
 drivers/ddr/marvell/axp/ddr3_pbs.c                            | 1 +
 drivers/ddr/marvell/axp/ddr3_read_leveling.c                  | 1 +
 drivers/ddr/marvell/axp/ddr3_sdram.c                          | 1 +
 drivers/ddr/marvell/axp/ddr3_spd.c                            | 1 +
 drivers/ddr/marvell/axp/ddr3_write_leveling.c                 | 1 +
 drivers/ddr/marvell/axp/xor.c                                 | 1 +
 drivers/ddr/microchip/ddr2.c                                  | 2 ++
 drivers/ddr/microchip/ddr2_regs.h                             | 1 +
 drivers/demo/demo-shape.c                                     | 1 +
 drivers/demo/demo-simple.c                                    | 1 +
 drivers/dfu/dfu.c                                             | 3 +++
 drivers/dfu/dfu_mmc.c                                         | 1 +
 drivers/dfu/dfu_mtd.c                                         | 2 ++
 drivers/dfu/dfu_nand.c                                        | 1 +
 drivers/dfu/dfu_ram.c                                         | 1 +
 drivers/dfu/dfu_sf.c                                          | 1 +
 drivers/dfu/dfu_tftp.c                                        | 1 +
 drivers/dfu/dfu_virt.c                                        | 2 ++
 drivers/dma/MCD_dmaApi.c                                      | 1 +
 drivers/dma/MCD_tasks.c                                       | 1 +
 drivers/dma/MCD_tasksInit.c                                   | 1 +
 drivers/dma/apbh_dma.c                                        | 1 +
 drivers/dma/bcm6348-iudma.c                                   | 2 ++
 drivers/dma/dma-uclass.c                                      | 1 +
 drivers/dma/fsl_dma.c                                         | 1 +
 drivers/dma/keystone_nav.c                                    | 1 +
 drivers/dma/keystone_nav_cfg.c                                | 1 +
 drivers/dma/lpc32xx_dma.c                                     | 1 +
 drivers/dma/sandbox-dma-test.c                                | 1 +
 drivers/dma/ti-edma3.c                                        | 1 +
 drivers/dma/ti/k3-psil.c                                      | 1 +
 drivers/dma/ti/k3-udma.c                                      | 3 +++
 drivers/fastboot/fb_command.c                                 | 1 +
 drivers/fastboot/fb_common.c                                  | 2 ++
 drivers/fastboot/fb_getvar.c                                  | 1 +
 drivers/fastboot/fb_mmc.c                                     | 1 +
 drivers/fastboot/fb_nand.c                                    | 2 ++
 drivers/firmware/firmware-zynqmp.c                            | 1 +
 drivers/firmware/ti_sci.c                                     | 2 ++
 drivers/firmware/ti_sci.h                                     | 2 ++
 drivers/fpga/ACEX1K.c                                         | 1 +
 drivers/fpga/altera.c                                         | 1 +
 drivers/fpga/cyclon2.c                                        | 1 +
 drivers/fpga/fpga.c                                           | 2 ++
 drivers/fpga/lattice.c                                        | 1 +
 drivers/fpga/socfpga.c                                        | 1 +
 drivers/fpga/socfpga_arria10.c                                | 1 +
 drivers/fpga/socfpga_gen5.c                                   | 1 +
 drivers/fpga/spartan2.c                                       | 1 +
 drivers/fpga/spartan3.c                                       | 1 +
 drivers/fpga/stratix10.c                                      | 1 +
 drivers/fpga/stratixII.c                                      | 1 +
 drivers/fpga/stratixv.c                                       | 1 +
 drivers/fpga/versalpl.c                                       | 1 +
 drivers/fpga/virtex2.c                                        | 1 +
 drivers/fpga/xilinx.c                                         | 1 +
 drivers/fpga/zynqmppl.c                                       | 2 ++
 drivers/fpga/zynqpl.c                                         | 1 +
 drivers/gpio/74x164_gpio.c                                    | 1 +
 drivers/gpio/adi_gpio2.c                                      | 1 +
 drivers/gpio/altera_pio.c                                     | 1 +
 drivers/gpio/at91_gpio.c                                      | 1 +
 drivers/gpio/atmel_pio4.c                                     | 1 +
 drivers/gpio/axp_gpio.c                                       | 1 +
 drivers/gpio/bcm2835_gpio.c                                   | 1 +
 drivers/gpio/bcm6345_gpio.c                                   | 1 +
 drivers/gpio/cortina_gpio.c                                   | 1 +
 drivers/gpio/da8xx_gpio.h                                     | 1 +
 drivers/gpio/db8500_gpio.c                                    | 2 ++
 drivers/gpio/dwapb_gpio.c                                     | 1 +
 drivers/gpio/gpio-rcar.c                                      | 2 ++
 drivers/gpio/gpio-rza1.c                                      | 1 +
 drivers/gpio/gpio-uclass.c                                    | 2 ++
 drivers/gpio/gpio-uniphier.c                                  | 2 ++
 drivers/gpio/hi6220_gpio.c                                    | 1 +
 drivers/gpio/hsdk-creg-gpio.c                                 | 1 +
 drivers/gpio/imx_rgpio2p.c                                    | 1 +
 drivers/gpio/intel_broadwell_gpio.c                           | 1 +
 drivers/gpio/intel_gpio.c                                     | 1 +
 drivers/gpio/intel_ich6_gpio.c                                | 1 +
 drivers/gpio/iproc_gpio.c                                     | 2 ++
 drivers/gpio/kona_gpio.c                                      | 1 +
 drivers/gpio/kw_gpio.c                                        | 1 +
 drivers/gpio/mpc83xx_spisel_boot.c                            | 2 ++
 drivers/gpio/mpc8xxx_gpio.c                                   | 2 ++
 drivers/gpio/mscc_sgpio.c                                     | 2 ++
 drivers/gpio/msm_gpio.c                                       | 1 +
 drivers/gpio/mt7621_gpio.c                                    | 2 ++
 drivers/gpio/mvebu_gpio.c                                     | 1 +
 drivers/gpio/mvgpio.c                                         | 1 +
 drivers/gpio/mvgpio.h                                         | 1 +
 drivers/gpio/mvmfp.c                                          | 1 +
 drivers/gpio/mxc_gpio.c                                       | 1 +
 drivers/gpio/mxs_gpio.c                                       | 1 +
 drivers/gpio/nx_gpio.c                                        | 1 +
 drivers/gpio/omap_gpio.c                                      | 1 +
 drivers/gpio/pca953x.c                                        | 1 +
 drivers/gpio/pca953x_gpio.c                                   | 1 +
 drivers/gpio/pca9698.c                                        | 1 +
 drivers/gpio/pcf8575_gpio.c                                   | 1 +
 drivers/gpio/pm8916_gpio.c                                    | 1 +
 drivers/gpio/rk_gpio.c                                        | 1 +
 drivers/gpio/s5p_gpio.c                                       | 1 +
 drivers/gpio/sandbox.c                                        | 1 +
 drivers/gpio/sh_pfc.c                                         | 1 +
 drivers/gpio/sifive-gpio.c                                    | 2 ++
 drivers/gpio/spear_gpio.c                                     | 1 +
 drivers/gpio/stm32_gpio.c                                     | 1 +
 drivers/gpio/sunxi_gpio.c                                     | 1 +
 drivers/gpio/tca642x.c                                        | 1 +
 drivers/gpio/tegra186_gpio.c                                  | 2 ++
 drivers/gpio/tegra_gpio.c                                     | 1 +
 drivers/gpio/vybrid_gpio.c                                    | 1 +
 drivers/gpio/xilinx_gpio.c                                    | 1 +
 drivers/gpio/zynq_gpio.c                                      | 1 +
 drivers/hwspinlock/hwspinlock-uclass.c                        | 1 +
 drivers/hwspinlock/stm32_hwspinlock.c                         | 1 +
 drivers/i2c/ast_i2c.c                                         | 2 ++
 drivers/i2c/ast_i2c.h                                         | 1 +
 drivers/i2c/at91_i2c.c                                        | 2 ++
 drivers/i2c/at91_i2c.h                                        | 1 +
 drivers/i2c/cros_ec_ldo.c                                     | 1 +
 drivers/i2c/davinci_i2c.c                                     | 1 +
 drivers/i2c/davinci_i2c.h                                     | 1 +
 drivers/i2c/designware_i2c.c                                  | 2 ++
 drivers/i2c/designware_i2c.h                                  | 1 +
 drivers/i2c/designware_i2c_pci.c                              | 2 ++
 drivers/i2c/exynos_hs_i2c.c                                   | 1 +
 drivers/i2c/fsl_i2c.c                                         | 1 +
 drivers/i2c/i2c-cdns.c                                        | 2 ++
 drivers/i2c/i2c-cortina.c                                     | 1 +
 drivers/i2c/i2c-cortina.h                                     | 1 +
 drivers/i2c/i2c-gpio.c                                        | 2 ++
 drivers/i2c/i2c-uclass.c                                      | 1 +
 drivers/i2c/i2c-uniphier-f.c                                  | 1 +
 drivers/i2c/i2c-uniphier.c                                    | 1 +
 drivers/i2c/i2c-versatile.c                                   | 1 +
 drivers/i2c/i2c_core.c                                        | 2 ++
 drivers/i2c/ihs_i2c.c                                         | 2 ++
 drivers/i2c/imx_lpi2c.c                                       | 2 ++
 drivers/i2c/intel_i2c.c                                       | 1 +
 drivers/i2c/iproc_i2c.c                                       | 2 ++
 drivers/i2c/kona_i2c.c                                        | 1 +
 drivers/i2c/lpc32xx_i2c.c                                     | 1 +
 drivers/i2c/meson_i2c.c                                       | 2 ++
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c                    | 1 +
 drivers/i2c/muxes/i2c-mux-gpio.c                              | 1 +
 drivers/i2c/muxes/i2c-mux-uclass.c                            | 1 +
 drivers/i2c/muxes/pca954x.c                                   | 1 +
 drivers/i2c/mv_i2c.c                                          | 2 ++
 drivers/i2c/mvtwsi.c                                          | 1 +
 drivers/i2c/mxc_i2c.c                                         | 2 ++
 drivers/i2c/nx_i2c.c                                          | 1 +
 drivers/i2c/octeon_i2c.c                                      | 2 ++
 drivers/i2c/omap24xx_i2c.c                                    | 2 ++
 drivers/i2c/rcar_i2c.c                                        | 2 ++
 drivers/i2c/rcar_iic.c                                        | 2 ++
 drivers/i2c/rk_i2c.c                                          | 2 ++
 drivers/i2c/s3c24x0_i2c.c                                     | 1 +
 drivers/i2c/s3c24x0_i2c.h                                     | 1 +
 drivers/i2c/sh_i2c.c                                          | 1 +
 drivers/i2c/soft_i2c.c                                        | 1 +
 drivers/i2c/stm32f7_i2c.c                                     | 2 ++
 drivers/i2c/tegra186_bpmp_i2c.c                               | 1 +
 drivers/i2c/tegra_i2c.c                                       | 2 ++
 drivers/i2c/xilinx_xiic.c                                     | 2 ++
 drivers/input/input.c                                         | 2 ++
 drivers/input/key_matrix.c                                    | 1 +
 drivers/input/tegra-kbc.c                                     | 1 +
 drivers/input/twl4030.c                                       | 1 +
 drivers/input/twl6030.c                                       | 1 +
 drivers/led/led_bcm6328.c                                     | 2 ++
 drivers/led/led_bcm6358.c                                     | 2 ++
 drivers/led/led_bcm6858.c                                     | 2 ++
 drivers/mailbox/k3-sec-proxy.c                                | 1 +
 drivers/mailbox/mailbox-uclass.c                              | 1 +
 drivers/mailbox/sandbox-mbox-test.c                           | 1 +
 drivers/mailbox/sandbox-mbox.c                                | 1 +
 drivers/mailbox/stm32-ipcc.c                                  | 2 ++
 drivers/mailbox/tegra-hsp.c                                   | 1 +
 drivers/mailbox/zynqmp-ipi.c                                  | 2 ++
 drivers/misc/ali512x.c                                        | 1 +
 drivers/misc/altera_sysid.c                                   | 1 +
 drivers/misc/atsha204a-i2c.c                                  | 1 +
 drivers/misc/cbmem_console.c                                  | 2 ++
 drivers/misc/cros_ec.c                                        | 2 ++
 drivers/misc/cros_ec_i2c.c                                    | 2 ++
 drivers/misc/cros_ec_lpc.c                                    | 1 +
 drivers/misc/cros_ec_sandbox.c                                | 2 ++
 drivers/misc/cros_ec_spi.c                                    | 1 +
 drivers/misc/ds4510.c                                         | 1 +
 drivers/misc/fs_loader.c                                      | 1 +
 drivers/misc/fsl_devdis.c                                     | 2 ++
 drivers/misc/fsl_ifc.c                                        | 1 +
 drivers/misc/fsl_iim.c                                        | 1 +
 drivers/misc/fsl_portals.c                                    | 2 ++
 drivers/misc/fsl_sec_mon.c                                    | 1 +
 drivers/misc/gdsys_ioep.c                                     | 1 +
 drivers/misc/gdsys_ioep.h                                     | 2 ++
 drivers/misc/gdsys_rxaui_ctrl.c                               | 1 +
 drivers/misc/i2c_eeprom.c                                     | 1 +
 drivers/misc/i2c_eeprom_emul.c                                | 1 +
 drivers/misc/ihs_fpga.c                                       | 1 +
 drivers/misc/ihs_fpga.h                                       | 1 +
 drivers/misc/imx8/fuse.c                                      | 1 +
 drivers/misc/imx8/scu.c                                       | 1 +
 drivers/misc/imx8/scu_api.c                                   | 1 +
 drivers/misc/irq-uclass.c                                     | 1 +
 drivers/misc/irq_sandbox.c                                    | 1 +
 drivers/misc/jz4780_efuse.c                                   | 2 ++
 drivers/misc/k3_avs.c                                         | 1 +
 drivers/misc/k3_esm.c                                         | 2 ++
 drivers/misc/microchip_flexcom.c                              | 1 +
 drivers/misc/misc_sandbox.c                                   | 1 +
 drivers/misc/mpc83xx_serdes.c                                 | 1 +
 drivers/misc/mpc83xx_serdes.h                                 | 1 +
 drivers/misc/mxc_ocotp.c                                      | 1 +
 drivers/misc/mxs_ocotp.c                                      | 1 +
 drivers/misc/p2sb-uclass.c                                    | 2 ++
 drivers/misc/p2sb_emul.c                                      | 1 +
 drivers/misc/p2sb_sandbox.c                                   | 1 +
 drivers/misc/pca9551_led.c                                    | 1 +
 drivers/misc/qfw.c                                            | 2 ++
 drivers/misc/rockchip-efuse.c                                 | 2 ++
 drivers/misc/rockchip-otp.c                                   | 2 ++
 drivers/misc/sandbox_adder.c                                  | 1 +
 drivers/misc/sifive-otp.c                                     | 2 ++
 drivers/misc/smsc_lpc47m.c                                    | 1 +
 drivers/misc/smsc_sio1007.c                                   | 1 +
 drivers/misc/spltest_sandbox.c                                | 1 +
 drivers/misc/status_led.c                                     | 1 +
 drivers/misc/stm32_rcc.c                                      | 1 +
 drivers/misc/stm32mp_fuse.c                                   | 1 +
 drivers/misc/swap_case.c                                      | 1 +
 drivers/misc/tegra186_bpmp.c                                  | 1 +
 drivers/misc/vexpress_config.c                                | 1 +
 drivers/misc/winbond_w83627.c                                 | 1 +
 drivers/mmc/am654_sdhci.c                                     | 2 ++
 drivers/mmc/arm_pl180_mmci.h                                  | 1 +
 drivers/mmc/aspeed_sdhci.c                                    | 1 +
 drivers/mmc/atmel_sdhci.c                                     | 1 +
 drivers/mmc/bcm2835_sdhci.c                                   | 1 +
 drivers/mmc/bcm2835_sdhost.c                                  | 3 +++
 drivers/mmc/ca_dw_mmc.c                                       | 2 ++
 drivers/mmc/davinci_mmc.c                                     | 1 +
 drivers/mmc/dw_mmc.c                                          | 1 +
 drivers/mmc/exynos_dw_mmc.c                                   | 1 +
 drivers/mmc/fsl_esdhc.c                                       | 3 +++
 drivers/mmc/fsl_esdhc_imx.c                                   | 2 ++
 drivers/mmc/fsl_esdhc_spl.c                                   | 1 +
 drivers/mmc/ftsdc010_mci.c                                    | 3 +++
 drivers/mmc/ftsdc010_mci.h                                    | 2 ++
 drivers/mmc/gen_atmel_mci.c                                   | 1 +
 drivers/mmc/hi6220_dw_mmc.c                                   | 1 +
 drivers/mmc/iproc_sdhci.c                                     | 1 +
 drivers/mmc/jz_mmc.c                                          | 2 ++
 drivers/mmc/kona_sdhci.c                                      | 1 +
 drivers/mmc/meson_gx_mmc.c                                    | 2 ++
 drivers/mmc/mmc-uclass.c                                      | 2 ++
 drivers/mmc/mmc.c                                             | 3 +++
 drivers/mmc/mmc_boot.c                                        | 1 +
 drivers/mmc/mmc_private.h                                     | 1 +
 drivers/mmc/mmc_spi.c                                         | 1 +
 drivers/mmc/mmc_write.c                                       | 1 +
 drivers/mmc/msm_sdhci.c                                       | 1 +
 drivers/mmc/mtk-sd.c                                          | 2 ++
 drivers/mmc/mv_sdhci.c                                        | 2 ++
 drivers/mmc/mvebu_mmc.c                                       | 1 +
 drivers/mmc/mxcmmc.c                                          | 1 +
 drivers/mmc/mxsmmc.c                                          | 1 +
 drivers/mmc/nexell_dw_mmc.c                                   | 1 +
 drivers/mmc/omap_hsmmc.c                                      | 3 +++
 drivers/mmc/pic32_sdhci.c                                     | 1 +
 drivers/mmc/pxa_mmc_gen.c                                     | 1 +
 drivers/mmc/renesas-sdhi.c                                    | 2 ++
 drivers/mmc/rockchip_dw_mmc.c                                 | 2 ++
 drivers/mmc/s5p_sdhci.c                                       | 1 +
 drivers/mmc/sandbox_mmc.c                                     | 1 +
 drivers/mmc/sdhci-cadence.c                                   | 2 ++
 drivers/mmc/sdhci.c                                           | 2 ++
 drivers/mmc/sh_mmcif.c                                        | 1 +
 drivers/mmc/sh_mmcif.h                                        | 1 +
 drivers/mmc/sh_sdhi.c                                         | 2 ++
 drivers/mmc/snps_dw_mmc.c                                     | 1 +
 drivers/mmc/socfpga_dw_mmc.c                                  | 1 +
 drivers/mmc/stm32_sdmmc2.c                                    | 2 ++
 drivers/mmc/sunxi_mmc.c                                       | 1 +
 drivers/mmc/tangier_sdhci.c                                   | 1 +
 drivers/mmc/tegra_mmc.c                                       | 1 +
 drivers/mmc/tmio-common.c                                     | 2 ++
 drivers/mmc/tmio-common.h                                     | 2 ++
 drivers/mmc/uniphier-sd.c                                     | 1 +
 drivers/mmc/xenon_sdhci.c                                     | 1 +
 drivers/mmc/zynq_sdhci.c                                      | 1 +
 drivers/mtd/altera_qspi.c                                     | 1 +
 drivers/mtd/cfi_flash.c                                       | 2 ++
 drivers/mtd/cfi_mtd.c                                         | 1 +
 drivers/mtd/hbmc-am654.c                                      | 2 ++
 drivers/mtd/jedec_flash.c                                     | 1 +
 drivers/mtd/mtd_uboot.c                                       | 1 +
 drivers/mtd/mtdcore.c                                         | 2 ++
 drivers/mtd/mtdpart.c                                         | 1 +
 drivers/mtd/mw_eeprom.c                                       | 1 +
 drivers/mtd/nand/raw/am335x_spl_bch.c                         | 2 ++
 drivers/mtd/nand/raw/arasan_nfc.c                             | 3 +++
 drivers/mtd/nand/raw/atmel_nand.c                             | 2 ++
 drivers/mtd/nand/raw/atmel_nand_ecc.h                         | 1 +
 drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c                 | 3 +++
 drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c                  | 3 +++
 drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c                 | 3 +++
 drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c                  | 3 +++
 drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c                  | 3 +++
 drivers/mtd/nand/raw/brcmnand/brcmnand.c                      | 3 +++
 drivers/mtd/nand/raw/brcmnand/brcmnand.h                      | 1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c               | 1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h               | 1 +
 drivers/mtd/nand/raw/davinci_nand.c                           | 2 ++
 drivers/mtd/nand/raw/denali.c                                 | 1 +
 drivers/mtd/nand/raw/denali.h                                 | 1 +
 drivers/mtd/nand/raw/denali_spl.c                             | 2 ++
 drivers/mtd/nand/raw/fsl_elbc_nand.c                          | 2 ++
 drivers/mtd/nand/raw/fsl_elbc_spl.c                           | 1 +
 drivers/mtd/nand/raw/fsl_ifc_nand.c                           | 2 ++
 drivers/mtd/nand/raw/fsl_ifc_spl.c                            | 1 +
 drivers/mtd/nand/raw/fsl_upm.c                                | 2 ++
 drivers/mtd/nand/raw/fsmc_nand.c                              | 2 ++
 drivers/mtd/nand/raw/kb9202_nand.c                            | 1 +
 drivers/mtd/nand/raw/kirkwood_nand.c                          | 1 +
 drivers/mtd/nand/raw/kmeter1_nand.c                           | 1 +
 drivers/mtd/nand/raw/lpc32xx_nand_mlc.c                       | 2 ++
 drivers/mtd/nand/raw/lpc32xx_nand_slc.c                       | 2 ++
 drivers/mtd/nand/raw/mxc_nand.c                               | 2 ++
 drivers/mtd/nand/raw/mxc_nand.h                               | 1 +
 drivers/mtd/nand/raw/mxc_nand_spl.c                           | 1 +
 drivers/mtd/nand/raw/mxs_nand.c                               | 1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c                           | 1 +
 drivers/mtd/nand/raw/nand.c                                   | 2 ++
 drivers/mtd/nand/raw/nand_base.c                              | 2 ++
 drivers/mtd/nand/raw/nand_bbt.c                               | 1 +
 drivers/mtd/nand/raw/nand_ecc.c                               | 1 +
 drivers/mtd/nand/raw/nand_spl_loaders.c                       | 1 +
 drivers/mtd/nand/raw/nand_spl_simple.c                        | 2 ++
 drivers/mtd/nand/raw/nand_util.c                              | 1 +
 drivers/mtd/nand/raw/omap_elm.c                               | 1 +
 drivers/mtd/nand/raw/omap_gpmc.c                              | 2 ++
 drivers/mtd/nand/raw/pxa3xx_nand.c                            | 1 +
 drivers/mtd/nand/raw/pxa3xx_nand.h                            | 1 +
 drivers/mtd/nand/raw/stm32_fmc2_nand.c                        | 3 +++
 drivers/mtd/nand/raw/sunxi_nand.c                             | 3 +++
 drivers/mtd/nand/raw/sunxi_nand_spl.c                         | 2 ++
 drivers/mtd/nand/raw/tegra_nand.c                             | 1 +
 drivers/mtd/nand/raw/tegra_nand.h                             | 1 +
 drivers/mtd/nand/raw/vf610_nfc.c                              | 2 ++
 drivers/mtd/nand/raw/zynq_nand.c                              | 3 +++
 drivers/mtd/nand/spi/core.c                                   | 2 ++
 drivers/mtd/nand/spi/gigadevice.c                             | 1 +
 drivers/mtd/nand/spi/macronix.c                               | 1 +
 drivers/mtd/nand/spi/micron.c                                 | 1 +
 drivers/mtd/nand/spi/toshiba.c                                | 1 +
 drivers/mtd/nand/spi/winbond.c                                | 1 +
 drivers/mtd/onenand/onenand_base.c                            | 2 ++
 drivers/mtd/onenand/onenand_bbt.c                             | 1 +
 drivers/mtd/onenand/onenand_spl.c                             | 1 +
 drivers/mtd/onenand/samsung.c                                 | 2 ++
 drivers/mtd/pic32_flash.c                                     | 2 ++
 drivers/mtd/renesas_rpc_hf.c                                  | 2 ++
 drivers/mtd/spi/fsl_espi_spl.c                                | 1 +
 drivers/mtd/spi/sandbox.c                                     | 1 +
 drivers/mtd/spi/sf-uclass.c                                   | 1 +
 drivers/mtd/spi/sf_dataflash.c                                | 1 +
 drivers/mtd/spi/sf_mtd.c                                      | 1 +
 drivers/mtd/spi/sf_probe.c                                    | 1 +
 drivers/mtd/spi/spi-nor-core.c                                | 2 ++
 drivers/mtd/spi/spi-nor-tiny.c                                | 2 ++
 drivers/mtd/st_smi.c                                          | 1 +
 drivers/mtd/stm32_flash.c                                     | 1 +
 drivers/mtd/stm32_flash.h                                     | 1 +
 drivers/mtd/ubi/attach.c                                      | 1 +
 drivers/mtd/ubi/build.c                                       | 2 ++
 drivers/mtd/ubi/crc32table.h                                  | 1 +
 drivers/mtd/ubi/debug.c                                       | 1 +
 drivers/mtd/ubi/eba.c                                         | 1 +
 drivers/mtd/ubi/fastmap.c                                     | 1 +
 drivers/mtd/ubi/io.c                                          | 1 +
 drivers/mtd/ubi/misc.c                                        | 1 +
 drivers/mtd/ubi/ubi-media.h                                   | 2 ++
 drivers/mtd/ubi/upd.c                                         | 1 +
 drivers/mtd/ubi/vmt.c                                         | 1 +
 drivers/mtd/ubi/vtbl.c                                        | 1 +
 drivers/mtd/ubispl/ubispl.c                                   | 1 +
 drivers/net/ag7xxx.c                                          | 2 ++
 drivers/net/altera_tse.c                                      | 1 +
 drivers/net/altera_tse.h                                      | 2 ++
 drivers/net/armada100_fec.h                                   | 1 +
 drivers/net/at91_emac.c                                       | 1 +
 drivers/net/ax88796.c                                         | 1 +
 drivers/net/ax88796.h                                         | 1 +
 drivers/net/bcm-sf2-eth-gmac.c                                | 2 ++
 drivers/net/bcm-sf2-eth-gmac.h                                | 1 +
 drivers/net/bcm-sf2-eth.c                                     | 1 +
 drivers/net/bcm-sf2-eth.h                                     | 1 +
 drivers/net/bcm6348-eth.c                                     | 2 ++
 drivers/net/bcm6368-eth.c                                     | 2 ++
 drivers/net/bcmgenet.c                                        | 1 +
 drivers/net/calxedaxgmac.c                                    | 1 +
 drivers/net/cs8900.c                                          | 1 +
 drivers/net/cs8900.h                                          | 1 +
 drivers/net/dc2114x.c                                         | 2 ++
 drivers/net/designware.c                                      | 1 +
 drivers/net/designware.h                                      | 1 +
 drivers/net/dm9000x.c                                         | 1 +
 drivers/net/dnet.c                                            | 1 +
 drivers/net/dnet.h                                            | 1 +
 drivers/net/dwc_eth_qos.c                                     | 3 +++
 drivers/net/dwmac_socfpga.c                                   | 1 +
 drivers/net/e1000.c                                           | 2 ++
 drivers/net/e1000.h                                           | 1 +
 drivers/net/e1000_spi.c                                       | 2 ++
 drivers/net/eepro100.c                                        | 2 ++
 drivers/net/ep93xx_eth.h                                      | 1 +
 drivers/net/ethoc.c                                           | 2 ++
 drivers/net/fec_mxc.c                                         | 2 ++
 drivers/net/fec_mxc.h                                         | 1 +
 drivers/net/fm/b4860.c                                        | 1 +
 drivers/net/fm/eth.c                                          | 2 ++
 drivers/net/fm/fdt.c                                          | 1 +
 drivers/net/fm/fm.c                                           | 1 +
 drivers/net/fm/fm.h                                           | 1 +
 drivers/net/fm/init.c                                         | 1 +
 drivers/net/fm/ls1043.c                                       | 1 +
 drivers/net/fm/ls1046.c                                       | 1 +
 drivers/net/fm/memac_phy.c                                    | 1 +
 drivers/net/fm/p1023.c                                        | 1 +
 drivers/net/fm/p4080.c                                        | 1 +
 drivers/net/fm/p5020.c                                        | 1 +
 drivers/net/fm/p5040.c                                        | 1 +
 drivers/net/fm/t1024.c                                        | 2 ++
 drivers/net/fm/t1040.c                                        | 1 +
 drivers/net/fm/t2080.c                                        | 2 ++
 drivers/net/fm/t4240.c                                        | 2 ++
 drivers/net/fm/tgec_phy.c                                     | 1 +
 drivers/net/fsl-mc/dpbp.c                                     | 1 +
 drivers/net/fsl-mc/dpio/dpio.c                                | 1 +
 drivers/net/fsl-mc/dpio/qbman_portal.c                        | 1 +
 drivers/net/fsl-mc/dpio/qbman_sys.h                           | 2 ++
 drivers/net/fsl-mc/dpmac.c                                    | 1 +
 drivers/net/fsl-mc/dpmng.c                                    | 1 +
 drivers/net/fsl-mc/dpni.c                                     | 1 +
 drivers/net/fsl-mc/dprc.c                                     | 1 +
 drivers/net/fsl-mc/dpsparser.c                                | 1 +
 drivers/net/fsl-mc/fsl_dpmng_cmd.h                            | 1 +
 drivers/net/fsl-mc/mc.c                                       | 3 +++
 drivers/net/fsl-mc/mc_sys.c                                   | 1 +
 drivers/net/fsl_enetc.c                                       | 2 ++
 drivers/net/fsl_enetc.h                                       | 1 +
 drivers/net/fsl_enetc_mdio.c                                  | 1 +
 drivers/net/fsl_ls_mdio.c                                     | 1 +
 drivers/net/fsl_mcdmafec.c                                    | 1 +
 drivers/net/fsl_mdio.c                                        | 2 ++
 drivers/net/ftgmac100.c                                       | 1 +
 drivers/net/ftmac100.c                                        | 1 +
 drivers/net/ftmac110.c                                        | 2 ++
 drivers/net/ftmac110.h                                        | 1 +
 drivers/net/gmac_rockchip.c                                   | 1 +
 drivers/net/higmacv300.c                                      | 2 ++
 drivers/net/ks8851_mll.c                                      | 1 +
 drivers/net/lan91c96.c                                        | 1 +
 drivers/net/ldpaa_eth/ldpaa_eth.c                             | 1 +
 drivers/net/ldpaa_eth/ldpaa_eth.h                             | 2 ++
 drivers/net/ldpaa_eth/ldpaa_wriop.c                           | 1 +
 drivers/net/ldpaa_eth/ls1088a.c                               | 2 ++
 drivers/net/ldpaa_eth/ls2080a.c                               | 2 ++
 drivers/net/ldpaa_eth/lx2160a.c                               | 2 ++
 drivers/net/lpc32xx_eth.c                                     | 1 +
 drivers/net/macb.c                                            | 3 +++
 drivers/net/mcffec.c                                          | 1 +
 drivers/net/mcfmii.c                                          | 1 +
 drivers/net/mdio_mux_i2creg.c                                 | 1 +
 drivers/net/mdio_mux_sandbox.c                                | 1 +
 drivers/net/mdio_sandbox.c                                    | 1 +
 drivers/net/mpc8xx_fec.c                                      | 2 ++
 drivers/net/mscc_eswitch/jr2_switch.c                         | 2 ++
 drivers/net/mscc_eswitch/luton_switch.c                       | 2 ++
 drivers/net/mscc_eswitch/mscc_mac_table.c                     | 2 ++
 drivers/net/mscc_eswitch/mscc_mac_table.h                     | 1 +
 drivers/net/mscc_eswitch/mscc_miim.c                          | 1 +
 drivers/net/mscc_eswitch/mscc_miim.h                          | 2 ++
 drivers/net/mscc_eswitch/mscc_xfer.c                          | 2 ++
 drivers/net/mscc_eswitch/mscc_xfer.h                          | 2 ++
 drivers/net/mscc_eswitch/ocelot_switch.c                      | 2 ++
 drivers/net/mscc_eswitch/serval_switch.c                      | 2 ++
 drivers/net/mscc_eswitch/servalt_switch.c                     | 2 ++
 drivers/net/mt7628-eth.c                                      | 3 +++
 drivers/net/mtk_eth.c                                         | 2 ++
 drivers/net/mvgbe.c                                           | 2 ++
 drivers/net/mvgbe.h                                           | 1 +
 drivers/net/mvmdio.c                                          | 1 +
 drivers/net/mvneta.c                                          | 2 ++
 drivers/net/mvpp2.c                                           | 3 +++
 drivers/net/natsemi.c                                         | 1 +
 drivers/net/ne2000.c                                          | 1 +
 drivers/net/ne2000.h                                          | 1 +
 drivers/net/ne2000_base.c                                     | 1 +
 drivers/net/ne2000_base.h                                     | 1 +
 drivers/net/netconsole.c                                      | 1 +
 drivers/net/ns8382x.c                                         | 1 +
 drivers/net/pch_gbe.c                                         | 1 +
 drivers/net/pch_gbe.h                                         | 1 +
 drivers/net/pcnet.c                                           | 2 ++
 drivers/net/pfe_eth/pfe_cmd.c                                 | 1 +
 drivers/net/pfe_eth/pfe_driver.c                              | 1 +
 drivers/net/pfe_eth/pfe_eth.c                                 | 1 +
 drivers/net/pfe_eth/pfe_firmware.c                            | 1 +
 drivers/net/pfe_eth/pfe_hw.c                                  | 1 +
 drivers/net/pfe_eth/pfe_mdio.c                                | 1 +
 drivers/net/phy/aquantia.c                                    | 2 ++
 drivers/net/phy/atheros.c                                     | 1 +
 drivers/net/phy/b53.c                                         | 1 +
 drivers/net/phy/broadcom.c                                    | 1 +
 drivers/net/phy/cortina.c                                     | 1 +
 drivers/net/phy/dp83867.c                                     | 1 +
 drivers/net/phy/fixed.c                                       | 1 +
 drivers/net/phy/generic_10g.c                                 | 1 +
 drivers/net/phy/marvell.c                                     | 1 +
 drivers/net/phy/micrel_ksz90x1.c                              | 1 +
 drivers/net/phy/miiphybb.c                                    | 1 +
 drivers/net/phy/mscc.c                                        | 2 ++
 drivers/net/phy/mv88e61xx.c                                   | 2 ++
 drivers/net/phy/mv88e6352.c                                   | 1 +
 drivers/net/phy/ncsi.c                                        | 2 ++
 drivers/net/phy/phy.c                                         | 3 +++
 drivers/net/phy/realtek.c                                     | 1 +
 drivers/net/phy/teranetics.c                                  | 1 +
 drivers/net/phy/vitesse.c                                     | 1 +
 drivers/net/phy/xilinx_gmii2rgmii.c                           | 1 +
 drivers/net/phy/xilinx_phy.c                                  | 1 +
 drivers/net/pic32_eth.c                                       | 2 ++
 drivers/net/pic32_eth.h                                       | 1 +
 drivers/net/pic32_mdio.c                                      | 1 +
 drivers/net/ravb.c                                            | 2 ++
 drivers/net/rtl8169.c                                         | 1 +
 drivers/net/sandbox-raw-bus.c                                 | 1 +
 drivers/net/sandbox-raw.c                                     | 1 +
 drivers/net/sandbox.c                                         | 1 +
 drivers/net/sh_eth.c                                          | 2 ++
 drivers/net/sh_eth.h                                          | 2 ++
 drivers/net/smc91111.c                                        | 1 +
 drivers/net/smc911x.c                                         | 1 +
 drivers/net/sni_ave.c                                         | 2 ++
 drivers/net/sun8i_emac.c                                      | 2 ++
 drivers/net/sunxi_emac.c                                      | 1 +
 drivers/net/ti/am65-cpsw-nuss.c                               | 2 ++
 drivers/net/ti/cpsw-common.c                                  | 1 +
 drivers/net/ti/cpsw.c                                         | 2 ++
 drivers/net/ti/cpsw_mdio.c                                    | 1 +
 drivers/net/ti/cpsw_mdio.h                                    | 1 +
 drivers/net/ti/davinci_emac.c                                 | 1 +
 drivers/net/ti/davinci_emac.h                                 | 1 +
 drivers/net/ti/keystone_net.c                                 | 1 +
 drivers/net/tsec.c                                            | 2 ++
 drivers/net/uli526x.c                                         | 1 +
 drivers/net/vsc7385.c                                         | 1 +
 drivers/net/vsc9953.c                                         | 1 +
 drivers/net/xilinx_axi_emac.c                                 | 1 +
 drivers/net/xilinx_emaclite.c                                 | 2 ++
 drivers/net/zynq_gem.c                                        | 3 +++
 drivers/nvme/nvme.c                                           | 3 +++
 drivers/nvme/nvme.h                                           | 2 ++
 drivers/nvme/nvme_show.c                                      | 1 +
 drivers/pch/pch-uclass.c                                      | 1 +
 drivers/pch/pch7.c                                            | 1 +
 drivers/pch/pch9.c                                            | 1 +
 drivers/pch/sandbox_pch.c                                     | 1 +
 drivers/pci/fsl_pci_init.c                                    | 1 +
 drivers/pci/pci-aardvark.c                                    | 1 +
 drivers/pci/pci-emul-uclass.c                                 | 1 +
 drivers/pci/pci-rcar-gen2.c                                   | 1 +
 drivers/pci/pci-rcar-gen3.c                                   | 1 +
 drivers/pci/pci-uclass.c                                      | 2 ++
 drivers/pci/pci.c                                             | 2 ++
 drivers/pci/pci_auto.c                                        | 1 +
 drivers/pci/pci_auto_common.c                                 | 1 +
 drivers/pci/pci_auto_old.c                                    | 1 +
 drivers/pci/pci_common.c                                      | 2 ++
 drivers/pci/pci_compat.c                                      | 1 +
 drivers/pci/pci_gt64120.c                                     | 1 +
 drivers/pci/pci_indirect.c                                    | 1 +
 drivers/pci/pci_mpc85xx.c                                     | 2 ++
 drivers/pci/pci_msc01.c                                       | 1 +
 drivers/pci/pci_mvebu.c                                       | 3 +++
 drivers/pci/pci_rom.c                                         | 3 +++
 drivers/pci/pci_sandbox.c                                     | 1 +
 drivers/pci/pci_sh7751.c                                      | 1 +
 drivers/pci/pci_sh7780.c                                      | 1 +
 drivers/pci/pci_tegra.c                                       | 2 ++
 drivers/pci/pci_x86.c                                         | 1 +
 drivers/pci/pcie_brcmstb.c                                    | 3 +++
 drivers/pci/pcie_dw_mvebu.c                                   | 1 +
 drivers/pci/pcie_dw_ti.c                                      | 3 +++
 drivers/pci/pcie_ecam_generic.c                               | 2 ++
 drivers/pci/pcie_fsl.c                                        | 2 ++
 drivers/pci/pcie_fsl.h                                        | 2 ++
 drivers/pci/pcie_imx.c                                        | 3 +++
 drivers/pci/pcie_intel_fpga.c                                 | 2 ++
 drivers/pci/pcie_layerscape.c                                 | 1 +
 drivers/pci/pcie_layerscape.h                                 | 2 ++
 drivers/pci/pcie_layerscape_ep.c                              | 2 ++
 drivers/pci/pcie_layerscape_fixup.c                           | 1 +
 drivers/pci/pcie_layerscape_fixup_common.c                    | 1 +
 drivers/pci/pcie_layerscape_gen4.c                            | 2 ++
 drivers/pci/pcie_layerscape_gen4.h                            | 2 ++
 drivers/pci/pcie_layerscape_gen4_fixup.c                      | 1 +
 drivers/pci/pcie_layerscape_rc.c                              | 1 +
 drivers/pci/pcie_mediatek.c                                   | 2 ++
 drivers/pci/pcie_phytium.c                                    | 1 +
 drivers/pci/pcie_rockchip.c                                   | 1 +
 drivers/pci/pcie_xilinx.c                                     | 1 +
 drivers/pci_endpoint/pci_ep-uclass.c                          | 1 +
 drivers/pci_endpoint/pcie-cadence-ep.c                        | 2 ++
 drivers/pci_endpoint/pcie-cadence.h                           | 2 ++
 drivers/pci_endpoint/sandbox-pci_ep.c                         | 1 +
 drivers/phy/allwinner/phy-sun4i-usb.c                         | 3 +++
 drivers/phy/bcm6318-usbh-phy.c                                | 1 +
 drivers/phy/bcm6348-usbh-phy.c                                | 1 +
 drivers/phy/bcm6358-usbh-phy.c                                | 1 +
 drivers/phy/bcm6368-usbh-phy.c                                | 2 ++
 drivers/phy/keystone-usb-phy.c                                | 2 ++
 drivers/phy/marvell/comphy_a3700.c                            | 1 +
 drivers/phy/marvell/comphy_core.c                             | 2 ++
 drivers/phy/marvell/comphy_core.h                             | 2 ++
 drivers/phy/marvell/comphy_cp110.c                            | 2 ++
 drivers/phy/marvell/comphy_mux.c                              | 2 ++
 drivers/phy/meson-g12a-usb3-pcie.c                            | 1 +
 drivers/phy/meson-gxbb-usb2.c                                 | 1 +
 drivers/phy/meson-gxl-usb2.c                                  | 1 +
 drivers/phy/meson-gxl-usb3.c                                  | 1 +
 drivers/phy/msm8916-usbh-phy.c                                | 2 ++
 drivers/phy/mt76x8-usb-phy.c                                  | 2 ++
 drivers/phy/omap-usb2-phy.c                                   | 2 ++
 drivers/phy/phy-mtk-tphy.c                                    | 2 ++
 drivers/phy/phy-rcar-gen2.c                                   | 1 +
 drivers/phy/phy-stm32-usbphyc.c                               | 1 +
 drivers/phy/phy-ti-am654.c                                    | 1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c                 | 1 +
 drivers/phy/rockchip/phy-rockchip-pcie.c                      | 1 +
 drivers/phy/rockchip/phy-rockchip-typec.c                     | 3 +++
 drivers/phy/sti_usb_phy.c                                     | 2 ++
 drivers/phy/ti-pipe3-phy.c                                    | 2 ++
 drivers/pinctrl/aspeed/pinctrl_ast2500.c                      | 1 +
 drivers/pinctrl/ath79/pinctrl_ar933x.c                        | 2 ++
 drivers/pinctrl/ath79/pinctrl_qca953x.c                       | 2 ++
 drivers/pinctrl/broadcom/pinctrl-bcm283x.c                    | 1 +
 drivers/pinctrl/broadcom/pinctrl-bcm6838.c                    | 1 +
 drivers/pinctrl/exynos/pinctrl-exynos.c                       | 1 +
 drivers/pinctrl/exynos/pinctrl-exynos7420.c                   | 1 +
 drivers/pinctrl/intel/pinctrl.c                               | 1 +
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c                 | 1 +
 drivers/pinctrl/mediatek/pinctrl-mtk-common.h                 | 2 ++
 drivers/pinctrl/meson/pinctrl-meson-axg.c                     | 1 +
 drivers/pinctrl/meson/pinctrl-meson-g12a.c                    | 1 +
 drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c                  | 2 ++
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c                    | 1 +
 drivers/pinctrl/meson/pinctrl-meson-gxl.c                     | 1 +
 drivers/pinctrl/meson/pinctrl-meson.c                         | 1 +
 drivers/pinctrl/meson/pinctrl-meson.h                         | 1 +
 drivers/pinctrl/mscc/mscc-common.c                            | 1 +
 drivers/pinctrl/mscc/mscc-common.h                            | 1 +
 drivers/pinctrl/mtmips/pinctrl-mt7628.c                       | 2 ++
 drivers/pinctrl/mtmips/pinctrl-mtmips-common.c                | 1 +
 drivers/pinctrl/mtmips/pinctrl-mtmips-common.h                | 2 ++
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c                   | 2 ++
 drivers/pinctrl/mvebu/pinctrl-mvebu.c                         | 1 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.h                         | 1 +
 drivers/pinctrl/nexell/pinctrl-nexell.c                       | 1 +
 drivers/pinctrl/nexell/pinctrl-nexell.h                       | 1 +
 drivers/pinctrl/nexell/pinctrl-s5pxx18.c                      | 2 ++
 drivers/pinctrl/nxp/pinctrl-imx.c                             | 1 +
 drivers/pinctrl/nxp/pinctrl-imx.h                             | 2 ++
 drivers/pinctrl/nxp/pinctrl-imx5.c                            | 1 +
 drivers/pinctrl/nxp/pinctrl-imx6.c                            | 1 +
 drivers/pinctrl/nxp/pinctrl-imx7.c                            | 1 +
 drivers/pinctrl/nxp/pinctrl-imx7ulp.c                         | 1 +
 drivers/pinctrl/nxp/pinctrl-imx8.c                            | 1 +
 drivers/pinctrl/nxp/pinctrl-imx8m.c                           | 1 +
 drivers/pinctrl/nxp/pinctrl-imxrt.c                           | 1 +
 drivers/pinctrl/nxp/pinctrl-mxs.c                             | 2 ++
 drivers/pinctrl/nxp/pinctrl-mxs.h                             | 2 ++
 drivers/pinctrl/nxp/pinctrl-scu.c                             | 1 +
 drivers/pinctrl/nxp/pinctrl-vf610.c                           | 1 +
 drivers/pinctrl/pinctrl-at91-pio4.c                           | 1 +
 drivers/pinctrl/pinctrl-at91.c                                | 2 ++
 drivers/pinctrl/pinctrl-generic.c                             | 1 +
 drivers/pinctrl/pinctrl-single.c                              | 1 +
 drivers/pinctrl/pinctrl-sti.c                                 | 1 +
 drivers/pinctrl/pinctrl-stmfx.c                               | 1 +
 drivers/pinctrl/pinctrl-uclass.c                              | 2 ++
 drivers/pinctrl/pinctrl_pic32.c                               | 2 ++
 drivers/pinctrl/pinctrl_stm32.c                               | 1 +
 drivers/pinctrl/renesas/pfc-r7s72100.c                        | 2 ++
 drivers/pinctrl/renesas/pfc-r8a7790.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a7791.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a7792.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a7794.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a7795.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a7796.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r8a77965.c                        | 1 +
 drivers/pinctrl/renesas/pfc-r8a77970.c                        | 1 +
 drivers/pinctrl/renesas/pfc-r8a77980.c                        | 1 +
 drivers/pinctrl/renesas/pfc-r8a77990.c                        | 1 +
 drivers/pinctrl/renesas/pfc-r8a77995.c                        | 1 +
 drivers/pinctrl/renesas/pfc.c                                 | 3 +++
 drivers/pinctrl/renesas/sh_pfc.h                              | 2 ++
 drivers/pinctrl/rockchip/pinctrl-px30.c                       | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3036.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3128.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3188.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk322x.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3288.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3308.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3328.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3368.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rk3399.c                     | 1 +
 drivers/pinctrl/rockchip/pinctrl-rockchip-core.c              | 2 ++
 drivers/pinctrl/rockchip/pinctrl-rv1108.c                     | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c              | 2 ++
 drivers/pinctrl/uniphier/pinctrl-uniphier.h                   | 1 +
 drivers/power/acpi_pmc/acpi-pmc-uclass.c                      | 1 +
 drivers/power/acpi_pmc/pmc_emul.c                             | 1 +
 drivers/power/acpi_pmc/sandbox.c                              | 1 +
 drivers/power/axp152.c                                        | 1 +
 drivers/power/axp209.c                                        | 1 +
 drivers/power/axp221.c                                        | 1 +
 drivers/power/axp809.c                                        | 1 +
 drivers/power/axp818.c                                        | 1 +
 drivers/power/domain/bcm6328-power-domain.c                   | 1 +
 drivers/power/domain/imx8-power-domain.c                      | 1 +
 drivers/power/domain/meson-ee-pwrc.c                          | 2 ++
 drivers/power/domain/meson-gx-pwrc-vpu.c                      | 1 +
 drivers/power/domain/mtk-power-domain.c                       | 2 ++
 drivers/power/domain/ti-sci-power-domain.c                    | 1 +
 drivers/power/exynos-tmu.c                                    | 1 +
 drivers/power/fuel_gauge/fg_max17042.c                        | 1 +
 drivers/power/mfd/fg_max77693.c                               | 1 +
 drivers/power/mt6323.c                                        | 1 +
 drivers/power/palmas.c                                        | 1 +
 drivers/power/pmic/act8846.c                                  | 1 +
 drivers/power/pmic/as3722.c                                   | 1 +
 drivers/power/pmic/as3722_gpio.c                              | 1 +
 drivers/power/pmic/bd71837.c                                  | 1 +
 drivers/power/pmic/da9063.c                                   | 2 ++
 drivers/power/pmic/fan53555.c                                 | 1 +
 drivers/power/pmic/i2c_pmic_emul.c                            | 1 +
 drivers/power/pmic/lp873x.c                                   | 1 +
 drivers/power/pmic/lp87565.c                                  | 1 +
 drivers/power/pmic/max77686.c                                 | 1 +
 drivers/power/pmic/max8997.c                                  | 1 +
 drivers/power/pmic/max8998.c                                  | 1 +
 drivers/power/pmic/mc34708.c                                  | 1 +
 drivers/power/pmic/palmas.c                                   | 1 +
 drivers/power/pmic/pca9450.c                                  | 1 +
 drivers/power/pmic/pfuze100.c                                 | 1 +
 drivers/power/pmic/pm8916.c                                   | 1 +
 drivers/power/pmic/pmic-uclass.c                              | 1 +
 drivers/power/pmic/pmic_hi6553.c                              | 1 +
 drivers/power/pmic/pmic_max8997.c                             | 1 +
 drivers/power/pmic/pmic_tps65217.c                            | 1 +
 drivers/power/pmic/pmic_tps65218.c                            | 1 +
 drivers/power/pmic/pmic_tps65910.c                            | 1 +
 drivers/power/pmic/pmic_tps65910_dm.c                         | 1 +
 drivers/power/pmic/rk8xx.c                                    | 1 +
 drivers/power/pmic/rn5t567.c                                  | 1 +
 drivers/power/pmic/s2mps11.c                                  | 1 +
 drivers/power/pmic/s5m8767.c                                  | 1 +
 drivers/power/pmic/sandbox.c                                  | 1 +
 drivers/power/pmic/stpmic1.c                                  | 1 +
 drivers/power/pmic/tps65090.c                                 | 1 +
 drivers/power/pmic/tps65941.c                                 | 1 +
 drivers/power/power_fsl.c                                     | 1 +
 drivers/power/regulator/act8846.c                             | 1 +
 drivers/power/regulator/as3722_regulator.c                    | 1 +
 drivers/power/regulator/bd71837.c                             | 2 ++
 drivers/power/regulator/da9063.c                              | 2 ++
 drivers/power/regulator/fan53555.c                            | 2 ++
 drivers/power/regulator/gpio-regulator.c                      | 1 +
 drivers/power/regulator/max77686.c                            | 1 +
 drivers/power/regulator/palmas_regulator.c                    | 1 +
 drivers/power/regulator/pbias_regulator.c                     | 2 ++
 drivers/power/regulator/pfuze100.c                            | 1 +
 drivers/power/regulator/regulator-uclass.c                    | 1 +
 drivers/power/regulator/rk8xx.c                               | 2 ++
 drivers/power/regulator/s2mps11_regulator.c                   | 2 ++
 drivers/power/regulator/sandbox.c                             | 2 ++
 drivers/power/regulator/stm32-vrefbuf.c                       | 3 +++
 drivers/power/regulator/stpmic1.c                             | 2 ++
 drivers/power/regulator/tps62360_regulator.c                  | 1 +
 drivers/power/regulator/tps65090_regulator.c                  | 1 +
 drivers/power/regulator/tps65910_regulator.c                  | 2 ++
 drivers/power/sy8106a.c                                       | 1 +
 drivers/power/tps6586x.c                                      | 1 +
 drivers/power/twl4030.c                                       | 1 +
 drivers/power/twl6030.c                                       | 1 +
 drivers/pwm/exynos_pwm.c                                      | 1 +
 drivers/pwm/pwm-imx.c                                         | 1 +
 drivers/pwm/pwm-mtk.c                                         | 3 +++
 drivers/pwm/pwm-sifive.c                                      | 3 +++
 drivers/pwm/pwm-uclass.c                                      | 1 +
 drivers/pwm/rk_pwm.c                                          | 1 +
 drivers/pwm/sandbox_pwm.c                                     | 1 +
 drivers/pwm/sunxi_pwm.c                                       | 1 +
 drivers/pwm/tegra_pwm.c                                       | 1 +
 drivers/qe/qe.c                                               | 2 ++
 drivers/qe/uccf.c                                             | 1 +
 drivers/qe/uec.c                                              | 1 +
 drivers/qe/uec_phy.c                                          | 1 +
 drivers/qe/uec_phy.h                                          | 1 +
 drivers/ram/bmips_ram.c                                       | 2 ++
 drivers/ram/imxrt_sdram.c                                     | 1 +
 drivers/ram/k3-am654-ddrss.c                                  | 2 ++
 drivers/ram/k3-am654-ddrss.h                                  | 1 +
 drivers/ram/k3-j721e/cps_drv_lpddr4.h                         | 1 +
 drivers/ram/k3-j721e/k3-j721e-ddrss.c                         | 2 ++
 drivers/ram/k3-j721e/lpddr4_private.h                         | 1 +
 drivers/ram/mediatek/ddr3-mt7629.c                            | 1 +
 drivers/ram/mpc83xx_sdram.c                                   | 1 +
 drivers/ram/rockchip/dmc-rk3368.c                             | 2 ++
 drivers/ram/rockchip/sdram_common.c                           | 2 ++
 drivers/ram/rockchip/sdram_pctl_px30.c                        | 2 ++
 drivers/ram/rockchip/sdram_phy_px30.c                         | 2 ++
 drivers/ram/rockchip/sdram_px30.c                             | 2 ++
 drivers/ram/rockchip/sdram_rk3128.c                           | 1 +
 drivers/ram/rockchip/sdram_rk3188.c                           | 2 ++
 drivers/ram/rockchip/sdram_rk3288.c                           | 2 ++
 drivers/ram/rockchip/sdram_rk3308.c                           | 1 +
 drivers/ram/rockchip/sdram_rk3328.c                           | 2 ++
 drivers/ram/rockchip/sdram_rk3399.c                           | 3 +++
 drivers/ram/sifive/fu540_ddr.c                                | 1 +
 drivers/ram/stm32_sdram.c                                     | 1 +
 drivers/ram/stm32mp1/stm32mp1_ddr.c                           | 3 +++
 drivers/ram/stm32mp1/stm32mp1_ddr.h                           | 1 +
 drivers/ram/stm32mp1/stm32mp1_ddr_regs.h                      | 1 +
 drivers/ram/stm32mp1/stm32mp1_interactive.c                   | 2 ++
 drivers/ram/stm32mp1/stm32mp1_ram.c                           | 3 +++
 drivers/ram/stm32mp1/stm32mp1_tests.c                         | 2 ++
 drivers/ram/stm32mp1/stm32mp1_tuning.c                        | 2 ++
 drivers/remoteproc/k3_system_controller.c                     | 2 ++
 drivers/remoteproc/rproc-elf-loader.c                         | 2 ++
 drivers/remoteproc/rproc-uclass.c                             | 1 +
 drivers/remoteproc/sandbox_testproc.c                         | 1 +
 drivers/remoteproc/stm32_copro.c                              | 2 ++
 drivers/remoteproc/ti_k3_arm64_rproc.c                        | 1 +
 drivers/remoteproc/ti_k3_dsp_rproc.c                          | 3 +++
 drivers/remoteproc/ti_k3_r5f_rproc.c                          | 3 +++
 drivers/remoteproc/ti_power_proc.c                            | 1 +
 drivers/remoteproc/ti_sci_proc.h                              | 1 +
 drivers/reset/ast2500-reset.c                                 | 1 +
 drivers/reset/reset-bcm6345.c                                 | 1 +
 drivers/reset/reset-hisilicon.c                               | 2 ++
 drivers/reset/reset-hsdk.c                                    | 2 ++
 drivers/reset/reset-imx7.c                                    | 2 ++
 drivers/reset/reset-mediatek.c                                | 1 +
 drivers/reset/reset-meson.c                                   | 1 +
 drivers/reset/reset-mtmips.c                                  | 1 +
 drivers/reset/reset-rockchip.c                                | 2 ++
 drivers/reset/reset-socfpga.c                                 | 2 ++
 drivers/reset/reset-sunxi.c                                   | 2 ++
 drivers/reset/reset-syscon.c                                  | 2 ++
 drivers/reset/reset-ti-sci.c                                  | 2 ++
 drivers/reset/reset-uniphier.c                                | 2 ++
 drivers/reset/sti-reset.c                                     | 3 +++
 drivers/rng/meson-rng.c                                       | 1 +
 drivers/rng/rng-uclass.c                                      | 1 +
 drivers/rng/rockchip_rng.c                                    | 1 +
 drivers/rng/sandbox_rng.c                                     | 1 +
 drivers/rng/stm32mp1_rng.c                                    | 1 +
 drivers/rtc/at91sam9_rtt.c                                    | 1 +
 drivers/rtc/ds1306.c                                          | 1 +
 drivers/rtc/ds1307.c                                          | 1 +
 drivers/rtc/ds1337.c                                          | 1 +
 drivers/rtc/ds1374.c                                          | 1 +
 drivers/rtc/ds1556.c                                          | 1 +
 drivers/rtc/ds164x.c                                          | 1 +
 drivers/rtc/ds174x.c                                          | 1 +
 drivers/rtc/ds3231.c                                          | 1 +
 drivers/rtc/ds3232.c                                          | 1 +
 drivers/rtc/i2c_rtc_emul.c                                    | 1 +
 drivers/rtc/imxdi.c                                           | 2 ++
 drivers/rtc/isl1208.c                                         | 1 +
 drivers/rtc/m41t11.c                                          | 1 +
 drivers/rtc/m41t60.c                                          | 1 +
 drivers/rtc/m41t62.c                                          | 1 +
 drivers/rtc/m41t94.c                                          | 1 +
 drivers/rtc/m48t35ax.c                                        | 1 +
 drivers/rtc/max6900.c                                         | 1 +
 drivers/rtc/mc13xxx-rtc.c                                     | 1 +
 drivers/rtc/mc146818.c                                        | 1 +
 drivers/rtc/mk48t59.c                                         | 1 +
 drivers/rtc/mvrtc.c                                           | 1 +
 drivers/rtc/mvrtc.h                                           | 1 +
 drivers/rtc/mx27rtc.c                                         | 1 +
 drivers/rtc/mxsrtc.c                                          | 1 +
 drivers/rtc/pcf2127.c                                         | 1 +
 drivers/rtc/pcf8563.c                                         | 1 +
 drivers/rtc/pt7c4338.c                                        | 1 +
 drivers/rtc/rtc-uclass.c                                      | 1 +
 drivers/rtc/rv3029.c                                          | 1 +
 drivers/rtc/rv8803.c                                          | 1 +
 drivers/rtc/rx8010sj.c                                        | 1 +
 drivers/rtc/rx8025.c                                          | 1 +
 drivers/rtc/s35392a.c                                         | 1 +
 drivers/rtc/s3c24x0_rtc.c                                     | 1 +
 drivers/rtc/sandbox_rtc.c                                     | 1 +
 drivers/rtc/stm32_rtc.c                                       | 1 +
 drivers/rtc/x1205.c                                           | 1 +
 drivers/scsi/scsi.c                                           | 2 ++
 drivers/serial/altera_jtag_uart.c                             | 1 +
 drivers/serial/altera_uart.c                                  | 1 +
 drivers/serial/atmel_usart.c                                  | 2 ++
 drivers/serial/atmel_usart.h                                  | 1 +
 drivers/serial/lpc32xx_hsuart.c                               | 1 +
 drivers/serial/ns16550.c                                      | 1 +
 drivers/serial/sandbox.c                                      | 2 ++
 drivers/serial/serial-uclass.c                                | 1 +
 drivers/serial/serial.c                                       | 1 +
 drivers/serial/serial_ar933x.c                                | 2 ++
 drivers/serial/serial_arc.c                                   | 1 +
 drivers/serial/serial_bcm283x_mu.c                            | 1 +
 drivers/serial/serial_bcm6345.c                               | 2 ++
 drivers/serial/serial_cortina.c                               | 2 ++
 drivers/serial/serial_efi.c                                   | 1 +
 drivers/serial/serial_linflexuart.c                           | 1 +
 drivers/serial/serial_lpuart.c                                | 2 ++
 drivers/serial/serial_mcf.c                                   | 1 +
 drivers/serial/serial_meson.c                                 | 1 +
 drivers/serial/serial_mpc8xx.c                                | 2 ++
 drivers/serial/serial_msm.c                                   | 1 +
 drivers/serial/serial_mtk.c                                   | 2 ++
 drivers/serial/serial_mvebu_a3700.c                           | 1 +
 drivers/serial/serial_mxc.c                                   | 2 ++
 drivers/serial/serial_ns16550.c                               | 1 +
 drivers/serial/serial_omap.c                                  | 1 +
 drivers/serial/serial_pic32.c                                 | 3 +++
 drivers/serial/serial_pl01x.c                                 | 1 +
 drivers/serial/serial_pl01x_internal.h                        | 1 +
 drivers/serial/serial_pxa.c                                   | 2 ++
 drivers/serial/serial_s5p.c                                   | 1 +
 drivers/serial/serial_sh.c                                    | 1 +
 drivers/serial/serial_sifive.c                                | 2 ++
 drivers/serial/serial_sti_asc.c                               | 1 +
 drivers/serial/serial_stm32.c                                 | 2 ++
 drivers/serial/serial_stm32.h                                 | 1 +
 drivers/serial/serial_uniphier.c                              | 3 +++
 drivers/serial/serial_zynq.c                                  | 2 ++
 drivers/serial/usbtty.c                                       | 1 +
 drivers/smem/msm_smem.c                                       | 2 ++
 drivers/smem/sandbox_smem.c                                   | 1 +
 drivers/smem/smem-uclass.c                                    | 1 +
 drivers/soc/soc_ti_k3.c                                       | 1 +
 drivers/soc/ti/k3-navss-ringacc.c                             | 3 +++
 drivers/soc/ti/keystone_serdes.c                              | 1 +
 drivers/sound/broadwell_i2s.c                                 | 1 +
 drivers/sound/broadwell_i2s.h                                 | 1 +
 drivers/sound/broadwell_sound.c                               | 1 +
 drivers/sound/codec-uclass.c                                  | 1 +
 drivers/sound/da7219.c                                        | 1 +
 drivers/sound/hda_codec.c                                     | 1 +
 drivers/sound/i2s-uclass.c                                    | 1 +
 drivers/sound/ivybridge_sound.c                               | 1 +
 drivers/sound/max98088.c                                      | 1 +
 drivers/sound/max98090.c                                      | 1 +
 drivers/sound/max98095.c                                      | 1 +
 drivers/sound/max98357a.c                                     | 1 +
 drivers/sound/rockchip_i2s.c                                  | 1 +
 drivers/sound/rockchip_sound.c                                | 1 +
 drivers/sound/rt5677.c                                        | 1 +
 drivers/sound/samsung-i2s.c                                   | 1 +
 drivers/sound/samsung_sound.c                                 | 1 +
 drivers/sound/sandbox.c                                       | 1 +
 drivers/sound/sound-uclass.c                                  | 1 +
 drivers/sound/sound.c                                         | 1 +
 drivers/sound/tegra_ahub.c                                    | 1 +
 drivers/sound/tegra_i2s.c                                     | 1 +
 drivers/sound/tegra_i2s_priv.h                                | 1 +
 drivers/sound/tegra_sound.c                                   | 1 +
 drivers/sound/wm8994.c                                        | 1 +
 drivers/spi/altera_spi.c                                      | 1 +
 drivers/spi/atcspi200_spi.c                                   | 1 +
 drivers/spi/ath79_spi.c                                       | 1 +
 drivers/spi/atmel-quadspi.c                                   | 3 +++
 drivers/spi/atmel_spi.c                                       | 1 +
 drivers/spi/bcm63xx_hsspi.c                                   | 2 ++
 drivers/spi/bcm63xx_spi.c                                     | 2 ++
 drivers/spi/bcmstb_spi.c                                      | 1 +
 drivers/spi/cadence_qspi.c                                    | 1 +
 drivers/spi/cadence_qspi.h                                    | 1 +
 drivers/spi/cadence_qspi_apb.c                                | 1 +
 drivers/spi/cf_spi.c                                          | 1 +
 drivers/spi/davinci_spi.c                                     | 1 +
 drivers/spi/designware_spi.c                                  | 3 +++
 drivers/spi/exynos_spi.c                                      | 1 +
 drivers/spi/fsl_dspi.c                                        | 2 ++
 drivers/spi/fsl_espi.c                                        | 1 +
 drivers/spi/fsl_qspi.c                                        | 3 +++
 drivers/spi/ich.c                                             | 2 ++
 drivers/spi/ich.h                                             | 2 ++
 drivers/spi/kirkwood_spi.c                                    | 1 +
 drivers/spi/meson_spifc.c                                     | 2 ++
 drivers/spi/mpc8xx_spi.c                                      | 2 ++
 drivers/spi/mpc8xxx_spi.c                                     | 2 ++
 drivers/spi/mscc_bb_spi.c                                     | 2 ++
 drivers/spi/mt7621_spi.c                                      | 2 ++
 drivers/spi/mtk_snfi_spi.c                                    | 2 ++
 drivers/spi/mvebu_a3700_spi.c                                 | 1 +
 drivers/spi/mxc_spi.c                                         | 2 ++
 drivers/spi/mxs_spi.c                                         | 1 +
 drivers/spi/nxp_fspi.c                                        | 3 +++
 drivers/spi/omap3_spi.c                                       | 1 +
 drivers/spi/pic32_spi.c                                       | 1 +
 drivers/spi/pl022_spi.c                                       | 2 ++
 drivers/spi/renesas_rpc_spi.c                                 | 2 ++
 drivers/spi/rk_spi.c                                          | 2 ++
 drivers/spi/rk_spi.h                                          | 1 +
 drivers/spi/sandbox_spi.c                                     | 2 ++
 drivers/spi/sh_qspi.c                                         | 1 +
 drivers/spi/soft_spi.c                                        | 1 +
 drivers/spi/spi-mem-nodm.c                                    | 1 +
 drivers/spi/spi-mem.c                                         | 2 ++
 drivers/spi/spi-sifive.c                                      | 1 +
 drivers/spi/spi-sunxi.c                                       | 2 ++
 drivers/spi/spi-uclass.c                                      | 2 ++
 drivers/spi/spi.c                                             | 1 +
 drivers/spi/stm32_qspi.c                                      | 3 +++
 drivers/spi/stm32_spi.c                                       | 3 +++
 drivers/spi/tegra114_spi.c                                    | 1 +
 drivers/spi/tegra20_sflash.c                                  | 1 +
 drivers/spi/tegra20_slink.c                                   | 1 +
 drivers/spi/tegra210_qspi.c                                   | 1 +
 drivers/spi/tegra_spi.h                                       | 1 +
 drivers/spi/ti_qspi.c                                         | 2 ++
 drivers/spi/uniphier_spi.c                                    | 2 ++
 drivers/spi/xilinx_spi.c                                      | 1 +
 drivers/spi/zynq_qspi.c                                       | 1 +
 drivers/spi/zynq_spi.c                                        | 1 +
 drivers/spi/zynqmp_gqspi.c                                    | 1 +
 drivers/spmi/spmi-msm.c                                       | 1 +
 drivers/spmi/spmi-sandbox.c                                   | 1 +
 drivers/spmi/spmi-uclass.c                                    | 1 +
 drivers/sysreset/sysreset-uclass.c                            | 1 +
 drivers/sysreset/sysreset_ast.c                               | 1 +
 drivers/sysreset/sysreset_mpc83xx.c                           | 2 ++
 drivers/sysreset/sysreset_octeon.c                            | 1 +
 drivers/sysreset/sysreset_socfpga.c                           | 1 +
 drivers/sysreset/sysreset_sti.c                               | 2 ++
 drivers/sysreset/sysreset_syscon.c                            | 1 +
 drivers/sysreset/sysreset_x86.c                               | 1 +
 drivers/tee/broadcom/chimp_optee.c                            | 1 +
 drivers/tee/optee/core.c                                      | 2 ++
 drivers/tee/optee/optee_private.h                             | 1 +
 drivers/tee/optee/optee_smc.h                                 | 1 +
 drivers/tee/optee/rpmb.c                                      | 1 +
 drivers/tee/sandbox.c                                         | 1 +
 drivers/tee/tee-uclass.c                                      | 1 +
 drivers/thermal/imx_scu_thermal.c                             | 1 +
 drivers/thermal/imx_thermal.c                                 | 1 +
 drivers/thermal/imx_tmu.c                                     | 2 ++
 drivers/thermal/ti-bandgap.c                                  | 1 +
 drivers/timer/ag101p_timer.c                                  | 1 +
 drivers/timer/altera_timer.c                                  | 1 +
 drivers/timer/arc_timer.c                                     | 1 +
 drivers/timer/atcpit100_timer.c                               | 1 +
 drivers/timer/atmel_pit_timer.c                               | 1 +
 drivers/timer/cadence-ttc.c                                   | 1 +
 drivers/timer/mpc83xx_timer.c                                 | 1 +
 drivers/timer/mtk_timer.c                                     | 2 ++
 drivers/timer/nomadik-mtu-timer.c                             | 1 +
 drivers/timer/rockchip_timer.c                                | 1 +
 drivers/timer/sti-timer.c                                     | 1 +
 drivers/timer/stm32_timer.c                                   | 1 +
 drivers/timer/timer-uclass.c                                  | 1 +
 drivers/timer/tsc_timer.c                                     | 2 ++
 drivers/tpm/cr50_i2c.c                                        | 2 ++
 drivers/tpm/tpm-uclass.c                                      | 1 +
 drivers/tpm/tpm2_ftpm_tee.c                                   | 1 +
 drivers/tpm/tpm2_ftpm_tee.h                                   | 1 +
 drivers/tpm/tpm2_tis_sandbox.c                                | 1 +
 drivers/tpm/tpm2_tis_spi.c                                    | 1 +
 drivers/tpm/tpm_atmel_twi.c                                   | 1 +
 drivers/tpm/tpm_internal.h                                    | 1 +
 drivers/tpm/tpm_tis.h                                         | 1 +
 drivers/tpm/tpm_tis_lpc.c                                     | 1 +
 drivers/tpm/tpm_tis_sandbox.c                                 | 2 ++
 drivers/ufs/cdns-platform.c                                   | 1 +
 drivers/ufs/ti-j721e-ufs.c                                    | 2 ++
 drivers/ufs/ufs.c                                             | 2 ++
 drivers/ufs/ufs.h                                             | 2 ++
 drivers/usb/cdns3/cdns3-ti.c                                  | 2 ++
 drivers/usb/cdns3/core.h                                      | 1 +
 drivers/usb/cdns3/drd.c                                       | 2 ++
 drivers/usb/cdns3/ep0.c                                       | 3 +++
 drivers/usb/cdns3/gadget.c                                    | 3 +++
 drivers/usb/cdns3/gadget.h                                    | 2 ++
 drivers/usb/common/fsl-dt-fixup.c                             | 1 +
 drivers/usb/common/fsl-errata.c                               | 1 +
 drivers/usb/dwc3/core.c                                       | 1 +
 drivers/usb/dwc3/core.h                                       | 2 ++
 drivers/usb/dwc3/dwc3-generic.c                               | 1 +
 drivers/usb/dwc3/dwc3-omap.c                                  | 2 ++
 drivers/usb/dwc3/dwc3-uniphier.c                              | 2 ++
 drivers/usb/dwc3/ep0.c                                        | 2 ++
 drivers/usb/dwc3/gadget.c                                     | 2 ++
 drivers/usb/dwc3/gadget.h                                     | 1 +
 drivers/usb/dwc3/io.h                                         | 2 ++
 drivers/usb/dwc3/linux-compat.h                               | 1 +
 drivers/usb/dwc3/samsung_usb_phy.c                            | 1 +
 drivers/usb/dwc3/ti_usb_phy.c                                 | 2 ++
 drivers/usb/emul/sandbox_flash.c                              | 2 ++
 drivers/usb/emul/sandbox_keyb.c                               | 1 +
 drivers/usb/emul/usb-emul-uclass.c                            | 2 ++
 drivers/usb/eth/asix.c                                        | 1 +
 drivers/usb/eth/asix88179.c                                   | 1 +
 drivers/usb/eth/lan75xx.c                                     | 1 +
 drivers/usb/eth/lan78xx.c                                     | 1 +
 drivers/usb/eth/lan7x.c                                       | 1 +
 drivers/usb/eth/lan7x.h                                       | 1 +
 drivers/usb/eth/mcs7830.c                                     | 2 ++
 drivers/usb/eth/r8152.c                                       | 2 ++
 drivers/usb/eth/r8152.h                                       | 2 ++
 drivers/usb/eth/r8152_fw.c                                    | 1 +
 drivers/usb/eth/smsc95xx.c                                    | 1 +
 drivers/usb/eth/usb_ether.c                                   | 1 +
 drivers/usb/gadget/at91_udc.c                                 | 2 ++
 drivers/usb/gadget/at91_udc.h                                 | 2 ++
 drivers/usb/gadget/atmel_usba_udc.c                           | 1 +
 drivers/usb/gadget/atmel_usba_udc.h                           | 1 +
 drivers/usb/gadget/bcm_udc_otg.h                              | 1 +
 drivers/usb/gadget/ci_udc.c                                   | 2 ++
 drivers/usb/gadget/ci_udc.h                                   | 1 +
 drivers/usb/gadget/composite.c                                | 2 ++
 drivers/usb/gadget/config.c                                   | 1 +
 drivers/usb/gadget/core.c                                     | 1 +
 drivers/usb/gadget/designware_udc.c                           | 1 +
 drivers/usb/gadget/dwc2_udc_otg.c                             | 3 +++
 drivers/usb/gadget/dwc2_udc_otg_priv.h                        | 1 +
 drivers/usb/gadget/dwc2_udc_otg_regs.h                        | 1 +
 drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c                    | 1 +
 drivers/usb/gadget/epautoconf.c                               | 1 +
 drivers/usb/gadget/ether.c                                    | 1 +
 drivers/usb/gadget/f_dfu.c                                    | 1 +
 drivers/usb/gadget/f_dfu.h                                    | 2 ++
 drivers/usb/gadget/f_mass_storage.c                           | 1 +
 drivers/usb/gadget/f_rockusb.c                                | 2 ++
 drivers/usb/gadget/f_sdp.c                                    | 3 +++
 drivers/usb/gadget/f_thor.c                                   | 1 +
 drivers/usb/gadget/f_thor.h                                   | 1 +
 drivers/usb/gadget/fotg210.c                                  | 1 +
 drivers/usb/gadget/g_dnl.c                                    | 1 +
 drivers/usb/gadget/ndis.h                                     | 1 +
 drivers/usb/gadget/pxa25x_udc.c                               | 1 +
 drivers/usb/gadget/pxa27x_udc.c                               | 1 +
 drivers/usb/gadget/storage_common.c                           | 1 +
 drivers/usb/gadget/usbstring.c                                | 1 +
 drivers/usb/host/dwc2.c                                       | 2 ++
 drivers/usb/host/dwc2.h                                       | 1 +
 drivers/usb/host/dwc3-sti-glue.c                              | 1 +
 drivers/usb/host/ehci-armada100.c                             | 1 +
 drivers/usb/host/ehci-atmel.c                                 | 1 +
 drivers/usb/host/ehci-exynos.c                                | 1 +
 drivers/usb/host/ehci-faraday.c                               | 2 ++
 drivers/usb/host/ehci-fsl.c                                   | 1 +
 drivers/usb/host/ehci-generic.c                               | 1 +
 drivers/usb/host/ehci-hcd.c                                   | 2 ++
 drivers/usb/host/ehci-marvell.c                               | 1 +
 drivers/usb/host/ehci-msm.c                                   | 1 +
 drivers/usb/host/ehci-mx5.c                                   | 2 ++
 drivers/usb/host/ehci-mx6.c                                   | 2 ++
 drivers/usb/host/ehci-mxc.c                                   | 1 +
 drivers/usb/host/ehci-mxs.c                                   | 2 ++
 drivers/usb/host/ehci-omap.c                                  | 1 +
 drivers/usb/host/ehci-pci.c                                   | 1 +
 drivers/usb/host/ehci-rmobile.c                               | 1 +
 drivers/usb/host/ehci-spear.c                                 | 1 +
 drivers/usb/host/ehci-tegra.c                                 | 1 +
 drivers/usb/host/ehci-vct.c                                   | 1 +
 drivers/usb/host/ehci-vf.c                                    | 2 ++
 drivers/usb/host/ehci-zynq.c                                  | 1 +
 drivers/usb/host/ehci.h                                       | 1 +
 drivers/usb/host/ohci-hcd.c                                   | 2 ++
 drivers/usb/host/ohci-lpc32xx.c                               | 1 +
 drivers/usb/host/ohci.h                                       | 1 +
 drivers/usb/host/r8a66597-hcd.c                               | 1 +
 drivers/usb/host/r8a66597.h                                   | 1 +
 drivers/usb/host/sl811-hcd.c                                  | 2 ++
 drivers/usb/host/usb-sandbox.c                                | 1 +
 drivers/usb/host/usb-uclass.c                                 | 1 +
 drivers/usb/host/xhci-brcm.c                                  | 1 +
 drivers/usb/host/xhci-dwc3.c                                  | 1 +
 drivers/usb/host/xhci-exynos5.c                               | 1 +
 drivers/usb/host/xhci-fsl.c                                   | 2 ++
 drivers/usb/host/xhci-mem.c                                   | 2 ++
 drivers/usb/host/xhci-mtk.c                                   | 2 ++
 drivers/usb/host/xhci-mvebu.c                                 | 2 ++
 drivers/usb/host/xhci-omap.c                                  | 1 +
 drivers/usb/host/xhci-pci.c                                   | 1 +
 drivers/usb/host/xhci-rcar-r8a779x_usb3_v3.h                  | 1 +
 drivers/usb/host/xhci-rcar.c                                  | 2 ++
 drivers/usb/host/xhci-ring.c                                  | 2 ++
 drivers/usb/host/xhci.c                                       | 2 ++
 drivers/usb/musb-new/am35x.c                                  | 2 ++
 drivers/usb/musb-new/da8xx.c                                  | 2 ++
 drivers/usb/musb-new/mt85xx.c                                 | 2 ++
 drivers/usb/musb-new/musb_core.c                              | 3 +++
 drivers/usb/musb-new/musb_core.h                              | 3 +++
 drivers/usb/musb-new/musb_dma.h                               | 2 ++
 drivers/usb/musb-new/musb_dsps.c                              | 2 ++
 drivers/usb/musb-new/musb_gadget.c                            | 2 ++
 drivers/usb/musb-new/musb_gadget.h                            | 1 +
 drivers/usb/musb-new/musb_gadget_ep0.c                        | 2 ++
 drivers/usb/musb-new/musb_host.c                              | 3 +++
 drivers/usb/musb-new/musb_io.h                                | 2 ++
 drivers/usb/musb-new/musb_regs.h                              | 2 ++
 drivers/usb/musb-new/musb_uboot.c                             | 2 ++
 drivers/usb/musb-new/omap2430.c                               | 1 +
 drivers/usb/musb-new/pic32.c                                  | 2 ++
 drivers/usb/musb-new/sunxi.c                                  | 3 +++
 drivers/usb/musb-new/ti-musb.c                                | 1 +
 drivers/usb/musb-new/usb-compat.h                             | 1 +
 drivers/usb/musb/am35x.c                                      | 1 +
 drivers/usb/musb/am35x.h                                      | 1 +
 drivers/usb/musb/musb_core.c                                  | 1 +
 drivers/usb/musb/musb_core.h                                  | 1 +
 drivers/usb/musb/musb_hcd.c                                   | 2 ++
 drivers/usb/musb/musb_udc.c                                   | 1 +
 drivers/usb/musb/omap3.c                                      | 1 +
 drivers/usb/musb/omap3.h                                      | 1 +
 drivers/usb/phy/omap_usb_phy.c                                | 1 +
 drivers/usb/phy/rockchip_usb2_phy.c                           | 1 +
 drivers/usb/phy/twl4030.c                                     | 1 +
 drivers/usb/ulpi/omap-ulpi-viewport.c                         | 1 +
 drivers/usb/ulpi/ulpi-viewport.c                              | 1 +
 drivers/usb/ulpi/ulpi.c                                       | 1 +
 drivers/video/am335x-fb.c                                     | 2 ++
 drivers/video/anx9804.c                                       | 1 +
 drivers/video/anx9804.h                                       | 1 +
 drivers/video/ati_radeon_fb.c                                 | 1 +
 drivers/video/ati_radeon_fb.h                                 | 1 +
 drivers/video/atmel_hlcdfb.c                                  | 1 +
 drivers/video/atmel_lcdfb.c                                   | 1 +
 drivers/video/bcm2835.c                                       | 1 +
 drivers/video/bridge/anx6345.c                                | 1 +
 drivers/video/bridge/ps862x.c                                 | 1 +
 drivers/video/bridge/video-bridge-uclass.c                    | 1 +
 drivers/video/broadwell_igd.c                                 | 2 ++
 drivers/video/bus_vcxk.c                                      | 1 +
 drivers/video/cfb_console.c                                   | 2 ++
 drivers/video/console_normal.c                                | 1 +
 drivers/video/console_rotate.c                                | 1 +
 drivers/video/console_truetype.c                              | 1 +
 drivers/video/da8xx-fb.c                                      | 1 +
 drivers/video/display-uclass.c                                | 1 +
 drivers/video/dw_hdmi.c                                       | 2 ++
 drivers/video/dw_mipi_dsi.c                                   | 3 +++
 drivers/video/efi.c                                           | 1 +
 drivers/video/exynos/exynos_dp.c                              | 1 +
 drivers/video/exynos/exynos_dp_lowlevel.c                     | 1 +
 drivers/video/exynos/exynos_dp_lowlevel.h                     | 1 +
 drivers/video/exynos/exynos_fb.c                              | 1 +
 drivers/video/exynos/exynos_mipi_dsi_common.c                 | 1 +
 drivers/video/exynos/exynos_mipi_dsi_lowlevel.c               | 1 +
 drivers/video/formike.c                                       | 1 +
 drivers/video/fsl_dcu_fb.c                                    | 1 +
 drivers/video/fsl_diu_fb.c                                    | 1 +
 drivers/video/hitachi_tx18d42vm_lcd.c                         | 1 +
 drivers/video/ihs_video_out.c                                 | 1 +
 drivers/video/imx/ipu_common.c                                | 1 +
 drivers/video/imx/ipu_regs.h                                  | 1 +
 drivers/video/imx/mxc_ipuv3_fb.c                              | 1 +
 drivers/video/ivybridge_igd.c                                 | 1 +
 drivers/video/lg4573.c                                        | 1 +
 drivers/video/logicore_dp_tx.c                                | 1 +
 drivers/video/logicore_dp_tx.h                                | 1 +
 drivers/video/logicore_dp_tx_regif.h                          | 1 +
 drivers/video/mali_dp.c                                       | 1 +
 drivers/video/mb862xx.c                                       | 1 +
 drivers/video/meson/meson_canvas.c                            | 1 +
 drivers/video/meson/meson_dw_hdmi.c                           | 3 +++
 drivers/video/meson/meson_plane.c                             | 1 +
 drivers/video/meson/meson_registers.h                         | 1 +
 drivers/video/meson/meson_vclk.c                              | 2 ++
 drivers/video/meson/meson_venc.c                              | 1 +
 drivers/video/meson/meson_vpu.c                               | 1 +
 drivers/video/meson/meson_vpu.h                               | 2 ++
 drivers/video/meson/meson_vpu_init.c                          | 1 +
 drivers/video/mipi_dsi.c                                      | 1 +
 drivers/video/mvebu_lcd.c                                     | 1 +
 drivers/video/mx3fb.c                                         | 1 +
 drivers/video/mxsfb.c                                         | 2 ++
 drivers/video/nexell/s5pxx18_dp.c                             | 1 +
 drivers/video/nexell/s5pxx18_dp_hdmi.c                        | 1 +
 drivers/video/nexell/s5pxx18_dp_lvds.c                        | 1 +
 drivers/video/nexell/s5pxx18_dp_mipi.c                        | 2 ++
 drivers/video/nexell/soc/s5pxx18_soc_lvds.h                   | 1 +
 drivers/video/nexell/soc/s5pxx18_soc_mipi.h                   | 1 +
 drivers/video/nexell_display.c                                | 2 ++
 drivers/video/omap3_dss.c                                     | 1 +
 drivers/video/orisetech_otm8009a.c                            | 1 +
 drivers/video/pwm_backlight.c                                 | 1 +
 drivers/video/pxa_lcd.c                                       | 1 +
 drivers/video/raydium-rm68200.c                               | 1 +
 drivers/video/rockchip/rk3288_vop.c                           | 1 +
 drivers/video/rockchip/rk3399_vop.c                           | 1 +
 drivers/video/rockchip/rk_edp.c                               | 2 ++
 drivers/video/rockchip/rk_hdmi.c                              | 1 +
 drivers/video/rockchip/rk_hdmi.h                              | 1 +
 drivers/video/rockchip/rk_lvds.c                              | 2 ++
 drivers/video/rockchip/rk_mipi.c                              | 1 +
 drivers/video/rockchip/rk_mipi.h                              | 1 +
 drivers/video/rockchip/rk_vop.c                               | 1 +
 drivers/video/rockchip/rk_vop.h                               | 1 +
 drivers/video/sandbox_osd.c                                   | 1 +
 drivers/video/scf0403_lcd.c                                   | 1 +
 drivers/video/ssd2828.c                                       | 1 +
 drivers/video/stb_truetype.h                                  | 1 +
 drivers/video/stm32/stm32_dsi.c                               | 2 ++
 drivers/video/stm32/stm32_ltdc.c                              | 2 ++
 drivers/video/sunxi/lcdc.c                                    | 1 +
 drivers/video/sunxi/sunxi_de2.c                               | 1 +
 drivers/video/sunxi/sunxi_display.c                           | 2 ++
 drivers/video/sunxi/sunxi_dw_hdmi.c                           | 1 +
 drivers/video/sunxi/sunxi_lcd.c                               | 1 +
 drivers/video/tda19988.c                                      | 1 +
 drivers/video/tegra.c                                         | 1 +
 drivers/video/tegra124/display.c                              | 1 +
 drivers/video/tegra124/displayport.h                          | 1 +
 drivers/video/tegra124/dp.c                                   | 2 ++
 drivers/video/tegra124/sor.c                                  | 2 ++
 drivers/video/tegra124/sor.h                                  | 1 +
 drivers/video/vesa.c                                          | 1 +
 drivers/video/vidconsole-uclass.c                             | 1 +
 drivers/video/video-uclass.c                                  | 2 ++
 drivers/video/video_bmp.c                                     | 3 +++
 drivers/video/video_osd-uclass.c                              | 1 +
 drivers/virtio/virtio-uclass.c                                | 1 +
 drivers/virtio/virtio_blk.c                                   | 1 +
 drivers/virtio/virtio_blk.h                                   | 1 +
 drivers/virtio/virtio_mmio.c                                  | 2 ++
 drivers/virtio/virtio_mmio.h                                  | 2 ++
 drivers/virtio/virtio_net.c                                   | 2 ++
 drivers/virtio/virtio_net.h                                   | 1 +
 drivers/virtio/virtio_pci.h                                   | 1 +
 drivers/virtio/virtio_pci_legacy.c                            | 2 ++
 drivers/virtio/virtio_pci_modern.c                            | 2 ++
 drivers/virtio/virtio_ring.c                                  | 1 +
 drivers/virtio/virtio_rng.c                                   | 1 +
 drivers/virtio/virtio_sandbox.c                               | 1 +
 drivers/w1-eeprom/ds24xxx.c                                   | 1 +
 drivers/w1-eeprom/ds2502.c                                    | 1 +
 drivers/w1-eeprom/eep_sandbox.c                               | 1 +
 drivers/w1-eeprom/w1-eeprom-uclass.c                          | 1 +
 drivers/w1/mxc_w1.c                                           | 1 +
 drivers/w1/w1-gpio.c                                          | 1 +
 drivers/w1/w1-uclass.c                                        | 1 +
 drivers/watchdog/armada-37xx-wdt.c                            | 2 ++
 drivers/watchdog/ast_wdt.c                                    | 1 +
 drivers/watchdog/at91sam9_wdt.c                               | 1 +
 drivers/watchdog/bcm6345_wdt.c                                | 2 ++
 drivers/watchdog/cdns_wdt.c                                   | 2 ++
 drivers/watchdog/cortina_wdt.c                                | 2 ++
 drivers/watchdog/designware_wdt.c                             | 2 ++
 drivers/watchdog/imx_watchdog.c                               | 3 +++
 drivers/watchdog/mpc8xx_wdt.c                                 | 2 ++
 drivers/watchdog/mt7621_wdt.c                                 | 2 ++
 drivers/watchdog/mtk_wdt.c                                    | 2 ++
 drivers/watchdog/omap_wdt.c                                   | 1 +
 drivers/watchdog/orion_wdt.c                                  | 3 +++
 drivers/watchdog/sandbox_wdt.c                                | 1 +
 drivers/watchdog/sbsa_gwdt.c                                  | 2 ++
 drivers/watchdog/sp805_wdt.c                                  | 2 ++
 drivers/watchdog/stm32mp_wdt.c                                | 1 +
 drivers/watchdog/tangier_wdt.c                                | 1 +
 drivers/watchdog/ulp_wdog.c                                   | 1 +
 drivers/watchdog/wdt-uclass.c                                 | 1 +
 drivers/watchdog/xilinx_tb_wdt.c                              | 2 ++
 drivers/watchdog/xilinx_wwdt.c                                | 1 +
 env/common.c                                                  | 1 +
 env/eeprom.c                                                  | 1 +
 env/env.c                                                     | 3 +++
 env/ext4.c                                                    | 2 ++
 env/fat.c                                                     | 2 ++
 env/flags.c                                                   | 1 +
 env/flash.c                                                   | 1 +
 env/mmc.c                                                     | 2 ++
 env/nand.c                                                    | 1 +
 env/nowhere.c                                                 | 1 +
 env/nvram.c                                                   | 1 +
 env/onenand.c                                                 | 1 +
 env/remote.c                                                  | 1 +
 env/sata.c                                                    | 2 ++
 env/sf.c                                                      | 2 ++
 examples/api/glue.c                                           | 1 +
 examples/api/glue.h                                           | 1 +
 examples/standalone/atmel_df_pow2.c                           | 1 +
 examples/standalone/sched.c                                   | 1 +
 fs/btrfs/btrfs.c                                              | 1 +
 fs/btrfs/btrfs.h                                              | 1 +
 fs/btrfs/btrfs_tree.h                                         | 1 +
 fs/btrfs/ctree.h                                              | 1 +
 fs/btrfs/subvolume.c                                          | 1 +
 fs/btrfs/super.c                                              | 1 +
 fs/cbfs/cbfs.c                                                | 1 +
 fs/cramfs/cramfs.c                                            | 1 +
 fs/ext4/dev.c                                                 | 1 +
 fs/ext4/ext4_common.c                                         | 1 +
 fs/ext4/ext4_common.h                                         | 1 +
 fs/ext4/ext4_journal.c                                        | 1 +
 fs/ext4/ext4_journal.h                                        | 1 +
 fs/ext4/ext4_write.c                                          | 2 ++
 fs/ext4/ext4fs.c                                              | 1 +
 fs/fat/fat.c                                                  | 1 +
 fs/fat/fat_write.c                                            | 1 +
 fs/fs.c                                                       | 2 ++
 fs/fs_internal.c                                              | 1 +
 fs/jffs2/compr_lzo.c                                          | 1 +
 fs/jffs2/compr_rtime.c                                        | 1 +
 fs/jffs2/compr_rubin.c                                        | 1 +
 fs/jffs2/jffs2_1pass.c                                        | 1 +
 fs/jffs2/jffs2_private.h                                      | 1 +
 fs/jffs2/summary.h                                            | 1 +
 fs/reiserfs/mode_string.c                                     | 1 +
 fs/reiserfs/reiserfs.c                                        | 1 +
 fs/reiserfs/reiserfs_private.h                                | 1 +
 fs/sandbox/sandboxfs.c                                        | 1 +
 fs/ubifs/debug.c                                              | 1 +
 fs/ubifs/debug.h                                              | 1 +
 fs/ubifs/io.c                                                 | 1 +
 fs/ubifs/key.h                                                | 1 +
 fs/ubifs/lprops.c                                             | 1 +
 fs/ubifs/lpt_commit.c                                         | 1 +
 fs/ubifs/misc.h                                               | 1 +
 fs/ubifs/orphan.c                                             | 1 +
 fs/ubifs/recovery.c                                           | 1 +
 fs/ubifs/replay.c                                             | 1 +
 fs/ubifs/scan.c                                               | 1 +
 fs/ubifs/super.c                                              | 1 +
 fs/ubifs/tnc.c                                                | 1 +
 fs/ubifs/tnc_misc.c                                           | 1 +
 fs/ubifs/ubifs-media.h                                        | 2 ++
 fs/ubifs/ubifs.c                                              | 1 +
 fs/ubifs/ubifs.h                                              | 1 +
 fs/yaffs2/yaffs_uboot_glue.c                                  | 1 +
 fs/yaffs2/yaffsfs.c                                           | 1 +
 fs/yaffs2/ydirectenv.h                                        | 1 +
 fs/zfs/zfs.c                                                  | 1 +
 fs/zfs/zfs_fletcher.c                                         | 1 +
 fs/zfs/zfs_lzjb.c                                             | 1 +
 fs/zfs/zfs_sha256.c                                           | 1 +
 include/ACEX1K.h                                              | 1 +
 include/MCD_dma.h                                             | 3 +++
 include/acpi/acpi_device.h                                    | 1 +
 include/acpi/acpi_s3.h                                        | 1 +
 include/acpi/acpi_table.h                                     | 2 ++
 include/ahci.h                                                | 1 +
 include/ali512x.h                                             | 1 +
 include/altera.h                                              | 1 +
 include/android_bootloader_message.h                          | 1 +
 include/api_public.h                                          | 1 +
 include/asm-generic/global_data.h                             | 1 +
 include/asm-generic/gpio.h                                    | 1 +
 include/asm-generic/int-ll64.h                                | 1 +
 include/asm-generic/io.h                                      | 1 +
 include/ata.h                                                 | 1 +
 include/atf_common.h                                          | 1 +
 include/atmel_hlcdc.h                                         | 1 +
 include/atmel_lcd.h                                           | 3 +++
 include/atmel_mci.h                                           | 1 +
 include/atsha204a-i2c.h                                       | 1 +
 include/audio_codec.h                                         | 1 +
 include/autoboot.h                                            | 2 ++
 include/avb_verify.h                                          | 1 +
 include/axi.h                                                 | 1 +
 include/binman.h                                              | 1 +
 include/blk.h                                                 | 1 +
 include/bloblist.h                                            | 1 +
 include/board.h                                               | 1 +
 include/bootcount.h                                           | 1 +
 include/bootm.h                                               | 1 +
 include/bootstage.h                                           | 1 +
 include/broadcom/chimp.h                                      | 1 +
 include/btrfs.h                                               | 1 +
 include/bus_vcxk.h                                            | 1 +
 include/cache.h                                               | 2 ++
 include/capitalization.h                                      | 1 +
 include/cavium/atf.h                                          | 1 +
 include/cbfs.h                                                | 1 +
 include/cli.h                                                 | 1 +
 include/clk-uclass.h                                          | 1 +
 include/command.h                                             | 1 +
 include/common.h                                              | 1 -
 include/cpsw.h                                                | 1 +
 include/cpu.h                                                 | 1 +
 include/cramfs/cramfs_fs.h                                    | 1 +
 include/cros_ec.h                                             | 1 +
 include/crypto/pkcs7.h                                        | 1 +
 include/crypto/pkcs7_parser.h                                 | 1 +
 include/crypto/x509_parser.h                                  | 1 +
 include/ddr_spd.h                                             | 1 +
 include/dfu.h                                                 | 1 +
 include/display.h                                             | 1 +
 include/display_options.h                                     | 1 +
 include/dm/device-internal.h                                  | 1 +
 include/dm/device.h                                           | 1 +
 include/dm/devres.h                                           | 1 +
 include/dm/of.h                                               | 1 +
 include/dm/of_access.h                                        | 1 +
 include/dm/of_addr.h                                          | 1 +
 include/dm/of_extra.h                                         | 1 +
 include/dm/ofnode.h                                           | 1 +
 include/dm/pci.h                                              | 1 +
 include/dm/pinctrl.h                                          | 1 +
 include/dm/platdata.h                                         | 1 +
 include/dm/platform_data/fsl_espi.h                           | 1 +
 include/dm/platform_data/net_ethoc.h                          | 1 +
 include/dm/platform_data/spi_coldfire.h                       | 1 +
 include/dm/platform_data/spi_davinci.h                        | 1 +
 include/dm/read.h                                             | 1 +
 include/dm/root.h                                             | 1 +
 include/dm/test.h                                             | 1 +
 include/dm/uclass.h                                           | 1 +
 include/dm9000.h                                              | 1 +
 include/dma-uclass.h                                          | 1 +
 include/dw_hdmi.h                                             | 1 +
 include/dwc3-uboot.h                                          | 1 +
 include/dwmmc.h                                               | 1 +
 include/ec_commands.h                                         | 2 ++
 include/edid.h                                                | 1 +
 include/eeprom.h                                              | 4 +++-
 include/eeprom_layout.h                                       | 1 +
 include/efi_api.h                                             | 2 ++
 include/efi_loader.h                                          | 2 ++
 include/efi_selftest.h                                        | 1 +
 include/efi_variable.h                                        | 1 +
 include/env_default.h                                         | 1 +
 include/env_internal.h                                        | 1 +
 include/ethsw.h                                               | 1 +
 include/exports.h                                             | 1 +
 include/ext4fs.h                                              | 1 +
 include/ext_common.h                                          | 1 +
 include/exynos_lcd.h                                          | 1 +
 include/fastboot-internal.h                                   | 1 +
 include/fastboot.h                                            | 1 +
 include/fat.h                                                 | 1 +
 include/fb_mmc.h                                              | 1 +
 include/fb_nand.h                                             | 1 +
 include/fdt_support.h                                         | 1 +
 include/fdtdec.h                                              | 1 +
 include/fis.h                                                 | 1 +
 include/flash.h                                               | 1 +
 include/fs.h                                                  | 1 +
 include/fs_loader.h                                           | 1 +
 include/fsl-mc/fsl_dpaa_fd.h                                  | 1 +
 include/fsl-mc/fsl_dpbp.h                                     | 1 +
 include/fsl-mc/fsl_dpio.h                                     | 1 +
 include/fsl-mc/fsl_dpmac.h                                    | 1 +
 include/fsl-mc/fsl_dpmng.h                                    | 1 +
 include/fsl-mc/fsl_dpni.h                                     | 1 +
 include/fsl-mc/fsl_dprc.h                                     | 1 +
 include/fsl-mc/fsl_dpsparser.h                                | 1 +
 include/fsl-mc/fsl_mc.h                                       | 2 ++
 include/fsl-mc/fsl_mc_cmd.h                                   | 2 ++
 include/fsl-mc/fsl_mc_sys.h                                   | 1 +
 include/fsl-mc/fsl_qbman_base.h                               | 1 +
 include/fsl-mc/fsl_qbman_portal.h                             | 1 +
 include/fsl-mc/ldpaa_wriop.h                                  | 1 +
 include/fsl_csu.h                                             | 1 +
 include/fsl_ddr.h                                             | 1 +
 include/fsl_ddr_sdram.h                                       | 1 +
 include/fsl_devdis.h                                          | 1 +
 include/fsl_diu_fb.h                                          | 1 +
 include/fsl_dspi.h                                            | 1 +
 include/fsl_errata.h                                          | 1 +
 include/fsl_esdhc.h                                           | 1 +
 include/fsl_esdhc_imx.h                                       | 1 +
 include/fsl_ifc.h                                             | 1 +
 include/fsl_immap.h                                           | 1 +
 include/fsl_lpuart.h                                          | 1 +
 include/fsl_mdio.h                                            | 2 ++
 include/fsl_memac.h                                           | 1 +
 include/fsl_mmdc.h                                            | 1 +
 include/fsl_qbman.h                                           | 2 ++
 include/fsl_sec.h                                             | 1 +
 include/fsl_sec_mon.h                                         | 1 +
 include/fsl_sfp.h                                             | 1 +
 include/fsl_tgec.h                                            | 1 +
 include/fsl_usb.h                                             | 1 +
 include/fsl_wdog.h                                            | 1 +
 include/fuse.h                                                | 1 +
 include/gdsys_fpga.h                                          | 1 +
 include/gzip.h                                                | 1 +
 include/hash.h                                                | 1 +
 include/hda_codec.h                                           | 1 +
 include/hw_sha.h                                              | 1 +
 include/i2c.h                                                 | 1 +
 include/i2c_eeprom.h                                          | 1 +
 include/i2s.h                                                 | 1 +
 include/ide.h                                                 | 1 +
 include/imx8image.h                                           | 2 ++
 include/imx_lpi2c.h                                           | 1 +
 include/imximage.h                                            | 1 +
 include/input.h                                               | 1 +
 include/ioports.h                                             | 1 +
 include/ipu_pixfmt.h                                          | 1 +
 include/irq.h                                                 | 1 +
 include/jffs2/jffs2_1pass.h                                   | 1 +
 include/jffs2/load_kernel.h                                   | 1 +
 include/k3-avs.h                                              | 2 ++
 include/kendryte/bypass.h                                     | 1 +
 include/kendryte/clk.h                                        | 1 +
 include/kendryte/pll.h                                        | 2 ++
 include/key_matrix.h                                          | 1 +
 include/keys/asymmetric-type.h                                | 1 +
 include/lattice.h                                             | 1 +
 include/lcd.h                                                 | 1 +
 include/lcd_console.h                                         | 1 +
 include/lcdvideo.h                                            | 1 +
 include/libata.h                                              | 1 +
 include/linux/mtd/omap_gpmc.h                                 | 2 ++
 include/linux/soc/ti/cppi5.h                                  | 3 +++
 include/linux/soc/ti/k3-navss-ringacc.h                       | 1 +
 include/linux/soc/ti/k3-sec-proxy.h                           | 1 +
 include/linux/soc/ti/ti-udma.h                                | 1 +
 include/linux/soc/ti/ti_sci_protocol.h                        | 2 ++
 include/lmb.h                                                 | 1 +
 include/lynxkdi.h                                             | 1 +
 include/lz4.h                                                 | 1 +
 include/mailbox.h                                             | 1 +
 include/malloc.h                                              | 1 +
 include/mapmem.h                                              | 1 +
 include/mc9sdz60.h                                            | 1 +
 include/memalign.h                                            | 1 +
 include/miiphy.h                                              | 1 +
 include/mipi_dsi.h                                            | 1 +
 include/mm_communication.h                                    | 1 +
 include/mmc.h                                                 | 1 +
 include/mpc86xx.h                                             | 1 +
 include/mtd/cfi_flash.h                                       | 1 +
 include/mtd/ubi-user.h                                        | 1 +
 include/mv88e6352.h                                           | 1 +
 include/mvebu/comphy.h                                        | 1 +
 include/mvebu_mmc.h                                           | 1 +
 include/mvmfp.h                                               | 1 +
 include/mxs_nand.h                                            | 1 +
 include/nand.h                                                | 1 +
 include/net/ncsi-pkt.h                                        | 1 +
 include/net/pcap.h                                            | 1 +
 include/net/pfe_eth/pfe/cbus/bmu.h                            | 1 +
 include/net/pfe_eth/pfe/cbus/class_csr.h                      | 1 +
 include/net/pfe_eth/pfe/cbus/gpi.h                            | 1 +
 include/net/pfe_eth/pfe/cbus/tmu_csr.h                        | 1 +
 include/net/pfe_eth/pfe/pfe_hw.h                              | 1 +
 include/net/pfe_eth/pfe_driver.h                              | 2 ++
 include/net/tftp.h                                            | 1 +
 include/netdev.h                                              | 1 +
 include/nvme.h                                                | 1 +
 include/opensbi.h                                             | 1 +
 include/p2sb.h                                                | 1 +
 include/palmas.h                                              | 1 +
 include/part.h                                                | 1 +
 include/part_efi.h                                            | 2 ++
 include/pca953x.h                                             | 1 +
 include/pca9698.h                                             | 1 +
 include/pch.h                                                 | 1 +
 include/pci.h                                                 | 1 +
 include/pci_ep.h                                              | 1 +
 include/pci_rom.h                                             | 1 +
 include/pe.h                                                  | 1 +
 include/phy.h                                                 | 1 +
 include/physmem.h                                             | 1 +
 include/post.h                                                | 1 +
 include/power/acpi_pmc.h                                      | 1 +
 include/power/as3722.h                                        | 1 +
 include/power/battery.h                                       | 1 +
 include/power/fg_battery_cell_params.h                        | 1 +
 include/power/hi6553_pmic.h                                   | 1 +
 include/power/max77686_pmic.h                                 | 1 +
 include/power/mc34vr500_pmic.h                                | 1 +
 include/power/pmic.h                                          | 1 +
 include/power/regulator.h                                     | 1 +
 include/power/rk8xx_pmic.h                                    | 1 +
 include/power/s5m8767.h                                       | 1 +
 include/power/tps65217.h                                      | 1 +
 include/power/tps65218.h                                      | 1 +
 include/power/tps65910_pmic.h                                 | 1 +
 include/pwm.h                                                 | 1 +
 include/pxa_lcd.h                                             | 1 +
 include/qfw.h                                                 | 2 ++
 include/ram.h                                                 | 1 +
 include/regmap.h                                              | 1 +
 include/remoteproc.h                                          | 1 +
 include/rng.h                                                 | 2 ++
 include/rtc.h                                                 | 1 +
 include/s_record.h                                            | 1 +
 include/samsung/misc.h                                        | 1 +
 include/sandbox-clk.h                                         | 2 ++
 include/sandboxfs.h                                           | 1 +
 include/sandboxtee.h                                          | 1 +
 include/sata.h                                                | 1 +
 include/sdhci.h                                               | 1 +
 include/search.h                                              | 1 +
 include/serial.h                                              | 1 +
 include/sja1000.h                                             | 1 +
 include/smbios.h                                              | 2 ++
 include/smem.h                                                | 1 +
 include/smsc_lpc47m.h                                         | 1 +
 include/sort.h                                                | 1 +
 include/sound.h                                               | 1 +
 include/spi-mem.h                                             | 1 +
 include/spi.h                                                 | 1 +
 include/spl.h                                                 | 1 +
 include/spl_gpio.h                                            | 1 +
 include/splash.h                                              | 1 +
 include/spmi/spmi.h                                           | 1 +
 include/stm32_rcc.h                                           | 1 +
 include/stratixII.h                                           | 1 +
 include/syscon.h                                              | 1 +
 include/sysreset.h                                            | 1 +
 include/tables_csum.h                                         | 1 +
 include/tca642x.h                                             | 1 +
 include/tee.h                                                 | 1 +
 include/tee/optee.h                                           | 1 +
 include/tegra-kbc.h                                           | 1 +
 include/test/ut.h                                             | 1 +
 include/timer.h                                               | 1 +
 include/tlv_eeprom.h                                          | 1 +
 include/tpm-common.h                                          | 1 +
 include/tpm-v1.h                                              | 2 ++
 include/tpm-v2.h                                              | 1 +
 include/trace.h                                               | 1 +
 include/tsec.h                                                | 2 ++
 include/twl4030.h                                             | 1 +
 include/twl6030.h                                             | 1 +
 include/u-boot/aes.h                                          | 1 +
 include/u-boot/crc.h                                          | 1 +
 include/u-boot/rsa-checksum.h                                 | 1 +
 include/u-boot/rsa-mod-exp.h                                  | 1 +
 include/u-boot/rsa.h                                          | 1 +
 include/u-boot/sha1.h                                         | 1 +
 include/u-boot/sha256.h                                       | 1 +
 include/u-boot/sha512.h                                       | 1 +
 include/u-boot/zlib.h                                         | 1 +
 include/ubifs_uboot.h                                         | 1 +
 include/ubispl.h                                              | 1 +
 include/uboot_aes.h                                           | 1 +
 include/usb.h                                                 | 1 +
 include/usb/designware_udc.h                                  | 1 +
 include/usb/dwc2_udc.h                                        | 1 +
 include/usb/ehci-ci.h                                         | 1 +
 include/usb/fotg210.h                                         | 1 +
 include/usb/fusbh200.h                                        | 1 +
 include/usb/ulpi.h                                            | 1 +
 include/usb/xhci.h                                            | 1 +
 include/usb_ether.h                                           | 1 +
 include/usb_mass_storage.h                                    | 1 +
 include/usbdevice.h                                           | 1 +
 include/uuid.h                                                | 1 +
 include/vbe.h                                                 | 2 ++
 include/video.h                                               | 1 +
 include/video_bridge.h                                        | 1 +
 include/video_console.h                                       | 1 +
 include/video_osd.h                                           | 1 +
 include/virtio.h                                              | 1 +
 include/virtio_ring.h                                         | 1 +
 include/vxworks.h                                             | 1 +
 include/w1-eeprom.h                                           | 1 +
 include/w1.h                                                  | 1 +
 include/wait_bit.h                                            | 1 +
 include/wdt.h                                                 | 1 +
 include/winbond_w83627.h                                      | 1 +
 include/xilinx.h                                              | 1 +
 include/zfs/dmu_objset.h                                      | 1 +
 include/zfs/dnode.h                                           | 1 +
 include/zfs/dsl_dataset.h                                     | 1 +
 include/zfs/dsl_dir.h                                         | 1 +
 include/zfs/sa_impl.h                                         | 1 +
 include/zfs/spa.h                                             | 1 +
 include/zfs/uberblock_impl.h                                  | 1 +
 include/zfs/vdev_impl.h                                       | 1 +
 include/zfs/zap_impl.h                                        | 1 +
 include/zfs/zap_leaf.h                                        | 1 +
 include/zfs/zfs.h                                             | 1 +
 include/zfs/zfs_acl.h                                         | 1 +
 include/zfs/zfs_znode.h                                       | 1 +
 include/zfs/zil.h                                             | 1 +
 include/zfs/zio.h                                             | 1 +
 include/zfs/zio_checksum.h                                    | 1 +
 include/zfs_common.h                                          | 1 +
 include/zynq_bootimg.h                                        | 1 +
 include/zynqmp_firmware.h                                     | 1 +
 include/zynqmp_tap_delay.h                                    | 1 +
 include/zynqpl.h                                              | 1 +
 lib/acpi/acpi_device.c                                        | 2 ++
 lib/acpi/acpi_dp.c                                            | 1 +
 lib/acpi/acpi_table.c                                         | 1 +
 lib/acpi/acpigen.c                                            | 1 +
 lib/addr_map.c                                                | 1 +
 lib/aes.c                                                     | 1 +
 lib/aes/aes-decrypt.c                                         | 1 +
 lib/asn1_decoder.c                                            | 1 +
 lib/at91/at91.c                                               | 1 +
 lib/bch.c                                                     | 1 +
 lib/charset.c                                                 | 1 +
 lib/crc16.c                                                   | 1 +
 lib/crc32.c                                                   | 1 +
 lib/crc32c.c                                                  | 1 +
 lib/crypto/asymmetric_type.c                                  | 2 ++
 lib/crypto/pkcs7_parser.c                                     | 2 ++
 lib/crypto/pkcs7_verify.c                                     | 1 +
 lib/crypto/public_key.c                                       | 1 +
 lib/crypto/rsa_helper.c                                       | 1 +
 lib/crypto/x509_cert_parser.c                                 | 1 +
 lib/crypto/x509_public_key.c                                  | 2 ++
 lib/dhry/cmd_dhry.c                                           | 1 +
 lib/display_options.c                                         | 2 ++
 lib/div64.c                                                   | 1 +
 lib/efi/efi_info.c                                            | 1 +
 lib/efi/efi_stub.c                                            | 2 ++
 lib/efi_driver/efi_block_device.c                             | 1 +
 lib/efi_driver/efi_uclass.c                                   | 1 +
 lib/efi_loader/efi_acpi.c                                     | 1 +
 lib/efi_loader/efi_bootmgr.c                                  | 1 +
 lib/efi_loader/efi_boottime.c                                 | 2 ++
 lib/efi_loader/efi_console.c                                  | 1 +
 lib/efi_loader/efi_device_path.c                              | 2 ++
 lib/efi_loader/efi_device_path_to_text.c                      | 1 +
 lib/efi_loader/efi_device_path_utilities.c                    | 1 +
 lib/efi_loader/efi_disk.c                                     | 2 ++
 lib/efi_loader/efi_file.c                                     | 1 +
 lib/efi_loader/efi_freestanding.c                             | 1 +
 lib/efi_loader/efi_gop.c                                      | 1 +
 lib/efi_loader/efi_hii.c                                      | 1 +
 lib/efi_loader/efi_hii_config.c                               | 1 +
 lib/efi_loader/efi_image_loader.c                             | 3 +++
 lib/efi_loader/efi_load_initrd.c                              | 1 +
 lib/efi_loader/efi_memory.c                                   | 3 +++
 lib/efi_loader/efi_net.c                                      | 2 ++
 lib/efi_loader/efi_rng.c                                      | 2 ++
 lib/efi_loader/efi_root_node.c                                | 1 +
 lib/efi_loader/efi_runtime.c                                  | 3 +++
 lib/efi_loader/efi_setup.c                                    | 1 +
 lib/efi_loader/efi_signature.c                                | 1 +
 lib/efi_loader/efi_smbios.c                                   | 1 +
 lib/efi_loader/efi_unicode_collation.c                        | 1 +
 lib/efi_loader/efi_var_common.c                               | 2 ++
 lib/efi_loader/efi_var_file.c                                 | 1 +
 lib/efi_loader/efi_var_mem.c                                  | 2 ++
 lib/efi_loader/efi_variable.c                                 | 1 +
 lib/efi_loader/efi_variable_tee.c                             | 1 +
 lib/efi_loader/helloworld.c                                   | 1 +
 lib/efi_selftest/efi_selftest.c                               | 1 +
 lib/efi_selftest/efi_selftest_bitblt.c                        | 1 +
 lib/efi_selftest/efi_selftest_block_device.c                  | 1 +
 lib/efi_selftest/efi_selftest_config_table.c                  | 1 +
 lib/efi_selftest/efi_selftest_console.c                       | 1 +
 lib/efi_selftest/efi_selftest_controllers.c                   | 1 +
 lib/efi_selftest/efi_selftest_crc32.c                         | 1 +
 lib/efi_selftest/efi_selftest_devicepath.c                    | 2 ++
 lib/efi_selftest/efi_selftest_event_groups.c                  | 1 +
 lib/efi_selftest/efi_selftest_exception.c                     | 1 +
 lib/efi_selftest/efi_selftest_fdt.c                           | 1 +
 lib/efi_selftest/efi_selftest_gop.c                           | 1 +
 lib/efi_selftest/efi_selftest_hii.c                           | 1 +
 lib/efi_selftest/efi_selftest_hii_data.c                      | 1 +
 lib/efi_selftest/efi_selftest_load_initrd.c                   | 1 +
 lib/efi_selftest/efi_selftest_loadimage.c                     | 2 ++
 lib/efi_selftest/efi_selftest_manageprotocols.c               | 1 +
 lib/efi_selftest/efi_selftest_mem.c                           | 1 +
 lib/efi_selftest/efi_selftest_memory.c                        | 1 +
 lib/efi_selftest/efi_selftest_miniapp_exit.c                  | 1 +
 lib/efi_selftest/efi_selftest_rng.c                           | 1 +
 lib/efi_selftest/efi_selftest_set_virtual_address_map.c       | 1 +
 lib/efi_selftest/efi_selftest_snp.c                           | 2 ++
 lib/efi_selftest/efi_selftest_startimage_exit.c               | 1 +
 lib/efi_selftest/efi_selftest_startimage_return.c             | 1 +
 lib/efi_selftest/efi_selftest_textinputex.c                   | 1 +
 lib/efi_selftest/efi_selftest_textoutput.c                    | 1 +
 lib/efi_selftest/efi_selftest_unaligned.c                     | 1 +
 lib/efi_selftest/efi_selftest_unicode_collation.c             | 1 +
 lib/efi_selftest/efi_selftest_util.c                          | 1 +
 lib/efi_selftest/efi_selftest_variables.c                     | 1 +
 lib/efi_selftest/efi_selftest_variables_runtime.c             | 1 +
 lib/efi_selftest/efi_selftest_watchdog.c                      | 1 +
 lib/elf.c                                                     | 1 +
 lib/fdtdec.c                                                  | 3 +++
 lib/fdtdec_test.c                                             | 1 +
 lib/gunzip.c                                                  | 2 ++
 lib/hashtable.c                                               | 1 +
 lib/hexdump.c                                                 | 2 ++
 lib/image-sparse.c                                            | 1 +
 lib/libavb/avb_sysdeps.h                                      | 1 +
 lib/libavb/avb_sysdeps_posix.c                                | 1 +
 lib/linux_compat.c                                            | 1 +
 lib/linux_string.c                                            | 1 +
 lib/lmb.c                                                     | 2 ++
 lib/lz4.c                                                     | 1 +
 lib/lzma/LzmaDec.c                                            | 1 +
 lib/lzma/LzmaTools.c                                          | 1 +
 lib/lzma/Types.h                                              | 1 +
 lib/lzo/lzo1x_decompress.c                                    | 1 +
 lib/lzo/lzodefs.h                                             | 1 +
 lib/membuff.c                                                 | 2 ++
 lib/net_utils.c                                               | 1 +
 lib/of_live.c                                                 | 2 ++
 lib/oid_registry.c                                            | 1 +
 lib/optee/optee.c                                             | 1 +
 lib/physmem.c                                                 | 2 ++
 lib/rsa/rsa-checksum.c                                        | 1 +
 lib/rsa/rsa-keyprop.c                                         | 1 +
 lib/rsa/rsa-mod-exp.c                                         | 1 +
 lib/rsa/rsa-verify.c                                          | 1 +
 lib/sha1.c                                                    | 1 +
 lib/sha256.c                                                  | 1 +
 lib/sha512.c                                                  | 1 +
 lib/smbios.c                                                  | 1 +
 lib/strto.c                                                   | 1 +
 lib/tables_csum.c                                             | 1 +
 lib/time.c                                                    | 1 +
 lib/tiny-printf.c                                             | 1 +
 lib/tizen/tizen.c                                             | 1 +
 lib/tpm-common.c                                              | 1 +
 lib/tpm-utils.h                                               | 1 +
 lib/tpm-v1.c                                                  | 1 +
 lib/tpm-v2.c                                                  | 1 +
 lib/trace.c                                                   | 1 +
 lib/uuid.c                                                    | 1 +
 lib/vsprintf.c                                                | 1 +
 lib/xxhash.c                                                  | 1 +
 lib/zstd/zstd_opt.h                                           | 1 +
 net/arp.c                                                     | 1 +
 net/arp.h                                                     | 1 +
 net/bootp.c                                                   | 2 ++
 net/bootp.h                                                   | 1 +
 net/cdp.c                                                     | 1 +
 net/cdp.h                                                     | 1 +
 net/dns.c                                                     | 1 +
 net/dns.h                                                     | 1 +
 net/eth-uclass.c                                              | 1 +
 net/eth_common.c                                              | 1 +
 net/eth_internal.h                                            | 1 +
 net/eth_legacy.c                                              | 1 +
 net/fastboot.c                                                | 3 +++
 net/mdio-mux-uclass.c                                         | 1 +
 net/mdio-uclass.c                                             | 1 +
 net/net.c                                                     | 1 +
 net/nfs.c                                                     | 1 +
 net/nfs.h                                                     | 1 +
 net/pcap.c                                                    | 1 +
 net/rarp.c                                                    | 1 +
 net/sntp.c                                                    | 1 +
 net/sntp.h                                                    | 1 +
 net/tftp.c                                                    | 2 ++
 net/wol.c                                                     | 1 +
 net/wol.h                                                     | 1 +
 post/cpu/mpc83xx/ecc.c                                        | 1 +
 post/drivers/flash.c                                          | 1 +
 post/drivers/memory.c                                         | 1 +
 post/drivers/rtc.c                                            | 1 +
 post/lib_powerpc/andi.c                                       | 1 +
 post/lib_powerpc/b.c                                          | 1 +
 post/lib_powerpc/cmp.c                                        | 1 +
 post/lib_powerpc/cmpi.c                                       | 1 +
 post/lib_powerpc/cpu.c                                        | 1 +
 post/lib_powerpc/cr.c                                         | 1 +
 post/lib_powerpc/load.c                                       | 1 +
 post/lib_powerpc/multi.c                                      | 1 +
 post/lib_powerpc/rlwimi.c                                     | 1 +
 post/lib_powerpc/rlwinm.c                                     | 1 +
 post/lib_powerpc/rlwnm.c                                      | 1 +
 post/lib_powerpc/srawi.c                                      | 1 +
 post/lib_powerpc/store.c                                      | 1 +
 post/lib_powerpc/string.c                                     | 1 +
 post/lib_powerpc/three.c                                      | 1 +
 post/lib_powerpc/threei.c                                     | 1 +
 post/lib_powerpc/threex.c                                     | 1 +
 post/lib_powerpc/two.c                                        | 1 +
 post/lib_powerpc/twox.c                                       | 1 +
 post/post.c                                                   | 2 ++
 test/bloblist.c                                               | 1 +
 test/cmd/mem_search.c                                         | 1 +
 test/compression.c                                            | 1 +
 test/dm/acpi.c                                                | 2 ++
 test/dm/acpi.h                                                | 1 +
 test/dm/acpi_dp.c                                             | 1 +
 test/dm/acpigen.c                                             | 1 +
 test/dm/audio.c                                               | 1 +
 test/dm/axi.c                                                 | 1 +
 test/dm/bootcount.c                                           | 1 +
 test/dm/clk.c                                                 | 1 +
 test/dm/core.c                                                | 1 +
 test/dm/devres.c                                              | 1 +
 test/dm/dma.c                                                 | 1 +
 test/dm/dsi_host.c                                            | 1 +
 test/dm/fdtdec.c                                              | 1 +
 test/dm/gpio.c                                                | 1 +
 test/dm/i2c.c                                                 | 1 +
 test/dm/i2s.c                                                 | 1 +
 test/dm/k210_pll.c                                            | 1 +
 test/dm/mailbox.c                                             | 1 +
 test/dm/mdio.c                                                | 1 +
 test/dm/mdio_mux.c                                            | 1 +
 test/dm/misc.c                                                | 1 +
 test/dm/ofnode.c                                              | 1 +
 test/dm/osd.c                                                 | 1 +
 test/dm/panel.c                                               | 1 +
 test/dm/pch.c                                                 | 1 +
 test/dm/pci.c                                                 | 1 +
 test/dm/pmic.c                                                | 1 +
 test/dm/power-domain.c                                        | 1 +
 test/dm/regmap.c                                              | 1 +
 test/dm/regulator.c                                           | 1 +
 test/dm/remoteproc.c                                          | 1 +
 test/dm/reset.c                                               | 1 +
 test/dm/rtc.c                                                 | 1 +
 test/dm/serial.c                                              | 1 +
 test/dm/sf.c                                                  | 1 +
 test/dm/smem.c                                                | 1 +
 test/dm/syscon-reset.c                                        | 1 +
 test/dm/tee.c                                                 | 1 +
 test/dm/test-fdt.c                                            | 1 +
 test/dm/video.c                                               | 1 +
 test/dm/virtio.c                                              | 1 +
 test/dm/wdt.c                                                 | 1 +
 test/env/hashtable.c                                          | 1 +
 test/lib/hexdump.c                                            | 1 +
 test/lib/lmb.c                                                | 1 +
 test/lib/string.c                                             | 1 +
 test/lib/test_aes.c                                           | 1 +
 test/optee/cmd_ut_optee.c                                     | 1 +
 test/overlay/cmd_ut_overlay.c                                 | 1 +
 test/print_ut.c                                               | 1 +
 test/stdint/int-types.c                                       | 1 +
 test/str_ut.c                                                 | 2 ++
 test/time_ut.c                                                | 1 +
 test/unicode_ut.c                                             | 1 +
 test/ut.c                                                     | 1 +
 4662 files changed, 5730 insertions(+), 5 deletions(-)

diff --git a/api/api_display.c b/api/api_display.c
index 4f2cdd7330e..499a75d9e04 100644
--- a/api/api_display.c
+++ b/api/api_display.c
@@ -8,6 +8,7 @@
 #include <lcd.h>
 #include <log.h>
 #include <video_font.h> /* Get font width and height */
+#include <linux/types.h>
 
 /* lcd.h needs BMP_LOGO_HEIGHT to calculate CONSOLE_ROWS */
 #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
diff --git a/api/api_private.h b/api/api_private.h
index 07fd50ad3a3..11499e45d33 100644
--- a/api/api_private.h
+++ b/api/api_private.h
@@ -8,6 +8,7 @@
 #ifndef _API_PRIVATE_H_
 #define _API_PRIVATE_H_
 
+#include <linux/types.h>
 void	api_init(void);
 void	platform_set_mr(struct sys_info *, unsigned long, unsigned long, int);
 int	platform_sys_info(struct sys_info *);
diff --git a/api/api_storage.c b/api/api_storage.c
index d4474d7d55c..49a1637d4d3 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -10,6 +10,7 @@
 #include <api_public.h>
 #include <part.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
 #include <usb.h>
diff --git a/arch/arc/include/asm/sections.h b/arch/arc/include/asm/sections.h
index 1c9c9db1386..62cbe9b7904 100644
--- a/arch/arc/include/asm/sections.h
+++ b/arch/arc/include/asm/sections.h
@@ -7,6 +7,7 @@
 #define __ASM_ARC_SECTIONS_H
 
 #include <asm-generic/sections.h>
+#include <linux/types.h>
 
 extern ulong __ivt_start;
 extern ulong __ivt_end;
diff --git a/arch/arc/include/asm/u-boot-arc.h b/arch/arc/include/asm/u-boot-arc.h
index dd2c0949c68..17e55876996 100644
--- a/arch/arc/include/asm/u-boot-arc.h
+++ b/arch/arc/include/asm/u-boot-arc.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_ARC_U_BOOT_ARC_H__
 #define __ASM_ARC_U_BOOT_ARC_H__
 
+#include <linux/types.h>
 int arch_early_init_r(void);
 
 void	board_init_f_r_trampoline(ulong) __attribute__ ((noreturn));
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index cf2f269882f..4289b6e134f 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <env.h>
 #include <image.h>
 #include <irq_func.h>
@@ -14,6 +15,7 @@
 #include <asm/cache.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 1bdffd052e4..fa58e5216ab 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 <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index b8d9ab5ab6d..b2ebe0ff455 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <malloc.h>
 #include <stdbool.h>
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index a1663c1eb39..f55ff930a87 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -9,6 +9,7 @@
 #include <asm-generic/sections.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 extern ulong __image_copy_start;
 extern ulong __ivt_start;
diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c
index 4869fa936bf..13fa8849ac8 100644
--- a/arch/arc/lib/reset.c
+++ b/arch/arc/lib/reset.c
@@ -5,8 +5,10 @@
 
 #include <command.h>
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 __weak void reset_cpu(ulong addr)
 {
diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index c6814a82d76..095f2dad226 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static u32 mx31_decode_pll(u32 reg, u32 infreq)
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index a001dee838d..160787d8af3 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm720t/interrupts.c b/arch/arm/cpu/arm720t/interrupts.c
index f0fc58deadb..ed5313ce469 100644
--- a/arch/arm/cpu/arm720t/interrupts.c
+++ b/arch/arm/cpu/arm720t/interrupts.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_ARCH_TEGRA)
 static ulong timestamp;
diff --git a/arch/arm/cpu/arm920t/ep93xx/cpu.c b/arch/arm/cpu/arm920t/ep93xx/cpu.c
index c9ea4e46a87..a53d4c6d1f3 100644
--- a/arch/arm/cpu/arm920t/ep93xx/cpu.c
+++ b/arch/arm/cpu/arm920t/ep93xx/cpu.c
@@ -12,6 +12,7 @@
 #include <cpu_func.h>
 #include <asm/arch/ep93xx.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */
 extern void reset_cpu(ulong addr)
diff --git a/arch/arm/cpu/arm920t/ep93xx/led.c b/arch/arm/cpu/arm920t/ep93xx/led.c
index 862663acbab..6eadb157e6e 100644
--- a/arch/arm/cpu/arm920t/ep93xx/led.c
+++ b/arch/arm/cpu/arm920t/ep93xx/led.c
@@ -7,6 +7,7 @@
 #include <asm/arch/ep93xx.h>
 #include <config.h>
 #include <status_led.h>
+#include <linux/types.h>
 
 static uint8_t saved_state[2] = {CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF};
 static uint32_t gpio_pin[2] = {1 << CONFIG_LED_STATUS_GREEN,
diff --git a/arch/arm/cpu/arm920t/ep93xx/speed.c b/arch/arm/cpu/arm920t/ep93xx/speed.c
index 51e9dda0550..69832d7138a 100644
--- a/arch/arm/cpu/arm920t/ep93xx/speed.c
+++ b/arch/arm/cpu/arm920t/ep93xx/speed.c
@@ -9,6 +9,7 @@
 #include <asm/arch/ep93xx.h>
 #include <asm/io.h>
 #include <div64.h>
+#include <linux/types.h>
 
 /*
  * CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL.
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 5c178ae6170..6ef6a6919e3 100644
--- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
+++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #define UARTCLK14745KHZ	(APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1))
diff --git a/arch/arm/cpu/arm926ejs/armada100/dram.c b/arch/arm/cpu/arm926ejs/armada100/dram.c
index 56bda678d67..bdd75b6d547 100644
--- a/arch/arm/cpu/arm926ejs/armada100/dram.c
+++ b/arch/arm/cpu/arm926ejs/armada100/dram.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/armada100.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index ec73393d0fc..54289331a7e 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -14,6 +14,7 @@
 #include <asm/arch/armada100.h>
 #include <asm/global_data.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 /*
  * Timer registers
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index acab9bccc01..67d80774ae4 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2011
  * Ilya Yanok, EmCraft Systems
  */
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <linux/types.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 71e143b8a92..f22b37df3ca 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -24,6 +24,7 @@
 #include <asm/arch/clock.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_FSL_ESDHC_IMX
 #include <fsl_esdhc_imx.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/reset.c b/arch/arm/cpu/arm926ejs/mx25/reset.c
index 38df1c94022..6148adbaa4e 100644
--- a/arch/arm/cpu/arm926ejs/mx25/reset.c
+++ b/arch/arm/cpu/arm926ejs/mx25/reset.c
@@ -19,6 +19,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 /*
  * Reset the cpu by setting up the watchdog timer and let it time out
diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 376ab2eaeac..7d080b9bdde 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -20,6 +20,7 @@
 #endif
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  *  get the system pll clock in Hz
diff --git a/arch/arm/cpu/arm926ejs/mx27/reset.c b/arch/arm/cpu/arm926ejs/mx27/reset.c
index 320b0a65e70..bcfb8834210 100644
--- a/arch/arm/cpu/arm926ejs/mx27/reset.c
+++ b/arch/arm/cpu/arm926ejs/mx27/reset.c
@@ -19,6 +19,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 /*
  * Reset the cpu by setting up the watchdog timer and let it time out
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index 4fd6a805968..d486585f8a4 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -24,6 +24,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/ptrace.h>
 #include <linux/delay.h>
+#include <linux/types.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 4e1cf3a1e32..52208774ce0 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 /*
  * The PLL frequency is 480MHz and XTAL frequency is 24MHz
diff --git a/arch/arm/cpu/arm926ejs/mxs/iomux.c b/arch/arm/cpu/arm926ejs/mxs/iomux.c
index 381264b8a18..4c80dd5d36a 100644
--- a/arch/arm/cpu/arm926ejs/mxs/iomux.c
+++ b/arch/arm/cpu/arm926ejs/mxs/iomux.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/types.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 84d67228631..1094477aeb3 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
@@ -29,6 +30,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
index 062deb7793f..31836d7d8d1 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
@@ -9,6 +9,7 @@
 #ifndef	__M28_INIT_H__
 #define	__M28_INIT_H__
 
+#include <linux/types.h>
 void early_delay(int delay);
 
 void mxs_power_init(void);
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 88386dbb20f..3fe7d79b905 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -20,6 +20,7 @@
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mxs_init.h"
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index 4d2d988c287..ff46c86b620 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <init.h>
 #include <log.h>
@@ -15,6 +16,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "mxs_init.h"
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index f57e1bb96c8..dcab4c12093 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -7,12 +7,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <hang.h>
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "mxs_init.h"
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 3dff3d768d1..58b1d041585 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -17,6 +17,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/delay.h>
+#include <linux/types.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 1c5f3af1bda..b82551bc56d 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_misc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/cpu/arm926ejs/spear/reset.c b/arch/arm/cpu/arm926ejs/spear/reset.c
index 7c3ba8b2dbd..38dfa023497 100644
--- a/arch/arm/cpu/arm926ejs/spear/reset.c
+++ b/arch/arm/cpu/arm926ejs/spear/reset.c
@@ -11,6 +11,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_syscntl.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 void reset_cpu(ulong ignored)
 {
diff --git a/arch/arm/cpu/arm926ejs/spear/spear600.c b/arch/arm/cpu/arm926ejs/spear/spear600.c
index 2b036215d1c..ca5c770f42a 100644
--- a/arch/arm/cpu/arm926ejs/spear/spear600.c
+++ b/arch/arm/cpu/arm926ejs/spear/spear600.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/spr_misc.h>
 #include <asm/arch/spr_defs.h>
+#include <asm/types.h>
 
 void spear_late_init(void)
 {
diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c
index fa4beced986..00670b35559 100644
--- a/arch/arm/cpu/arm926ejs/spear/spl.c
+++ b/arch/arm/cpu/arm926ejs/spear/spl.c
@@ -19,6 +19,7 @@
 #include <asm/arch/spr_syscntl.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/st_smi.h>
+#include <linux/types.h>
 
 /* Reserve some space to store the BootROM's stack pointer during SPL operation.
  * The BSS cannot be used for this purpose because it will be zeroed after
diff --git a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c
index 79ab2a70dc5..9b761c8d1f6 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #if (CONFIG_DDR_PLL2)
 
diff --git a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c
index 121b6360778..2e6bb0c8a69 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK)
 
diff --git a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c
index 64c8bab9bfa..d0473d0d680 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #if (CONFIG_DDR_HCLK)
 
diff --git a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c
index 87654663fcf..0bcedb19758 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK)
 
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index b111d6126b6..378439fdec6 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -21,6 +21,7 @@
 #include <asm/arch/spr_emi.h>
 #include <asm/arch/spr_defs.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define CPU		0
 #define DDR		1
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index b42baa71506..b5b7814d130 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -14,6 +14,7 @@
 #include <asm/arch/spr_misc.h>
 #include <asm/ptrace.h>
 #include <linux/delay.h>
+#include <linux/types.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/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index fb0ea5e817f..cb8adf58ece 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -18,6 +18,7 @@
 #include <irq_func.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 static void cache_flush(void);
 
diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index d96406f7626..774c5ad52c3 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <div64.h>
 #include <bootstage.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-bsc.c b/arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
index c8a8e358f74..40eda46d954 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.c b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index 098c5afb731..059a2464c1b 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@ -11,8 +11,10 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <bitfield.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.h b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
index 6dfc4afb006..e654d4a7aec 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
@@ -4,6 +4,7 @@
  */
 
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/stddef.h>
 #include <linux/stringify.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-sdio.c b/arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
index c21a23c2abe..301e24f359c 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c b/arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
index f065560d2d0..99a45c6f870 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include "clk-core.h"
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-bsc.c b/arch/arm/cpu/armv7/bcm281xx/clk-bsc.c
index c8a8e358f74..40eda46d954 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-bsc.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-bsc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.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 2fb195bf8f9..17530c8b739 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
@@ -11,8 +11,10 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <bitfield.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-core.h b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
index 74780012e24..1ce30b3e092 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
@@ -4,6 +4,7 @@
  */
 
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/stddef.h>
 #include <linux/stringify.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-sdio.c b/arch/arm/cpu/armv7/bcm281xx/clk-sdio.c
index c21a23c2abe..301e24f359c 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-sdio.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-sdio.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.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-usb-otg.c b/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c
index f065560d2d0..99a45c6f870 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include "clk-core.h"
diff --git a/arch/arm/cpu/armv7/bcm281xx/reset.c b/arch/arm/cpu/armv7/bcm281xx/reset.c
index fda5a9527ec..281d2e46eee 100644
--- a/arch/arm/cpu/armv7/bcm281xx/reset.c
+++ b/arch/arm/cpu/armv7/bcm281xx/reset.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/sysmap.h>
+#include <linux/types.h>
 
 #define EN_MASK		0x08000000	/* Enable timer */
 #define SRSTEN_MASK	0x04000000	/* Enable soft reset */
diff --git a/arch/arm/cpu/armv7/bcmcygnus/reset.c b/arch/arm/cpu/armv7/bcmcygnus/reset.c
index 3bfed34533b..023cbd64299 100644
--- a/arch/arm/cpu/armv7/bcmcygnus/reset.c
+++ b/arch/arm/cpu/armv7/bcmcygnus/reset.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #define CRMU_MAIL_BOX1		0x03024028
 #define CRMU_SOFT_RESET_CMD	0xFFFFFFFF
diff --git a/arch/arm/cpu/armv7/bcmnsp/reset.c b/arch/arm/cpu/armv7/bcmnsp/reset.c
index 675f99fe998..547defa92b4 100644
--- a/arch/arm/cpu/armv7/bcmnsp/reset.c
+++ b/arch/arm/cpu/armv7/bcmnsp/reset.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #define CRU_RESET_OFFSET	0x1803F184
 
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 146cf526089..a19aea275db 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -4,6 +4,7 @@
  * Texas Instruments, <www.ti.com>
  * Aneesh V <aneesh at ti.com>
  */
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <linux/types.h>
diff --git a/arch/arm/cpu/armv7/cp15.c b/arch/arm/cpu/armv7/cp15.c
index 0ac4e7ba8c8..482d1969a96 100644
--- a/arch/arm/cpu/armv7/cp15.c
+++ b/arch/arm/cpu/armv7/cp15.c
@@ -9,9 +9,11 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <asm/system.h>
 #include <asm/cache.h>
 #include <asm/armv7.h>
+#include <asm/types.h>
 #include <linux/compiler.h>
 
 void __weak v7_arch_cp15_set_l2aux_ctrl(u32 l2actlr, u32 cpu_midr,
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 8d1f91cd439..43b33f1585f 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/system.h>
diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c
index 5845cca9a33..08e558817f6 100644
--- a/arch/arm/cpu/armv7/exception_level.c
+++ b/arch/arm/cpu/armv7/exception_level.c
@@ -16,6 +16,7 @@
 #include <asm/armv7.h>
 #include <asm/secure.h>
 #include <asm/setjmp.h>
+#include <linux/types.h>
 
 /**
  * entry_non_secure() - entry point when switching to non-secure mode
diff --git a/arch/arm/cpu/armv7/iproc-common/armpll.c b/arch/arm/cpu/armv7/iproc-common/armpll.c
index 2ac598cee7b..89a5e37d39b 100644
--- a/arch/arm/cpu/armv7/iproc-common/armpll.c
+++ b/arch/arm/cpu/armv7/iproc-common/armpll.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/iproc-common/armpll.h>
 #include <asm/iproc-common/sysmap.h>
+#include <linux/types.h>
 
 #define NELEMS(x)	(sizeof(x) / sizeof(x[0]))
 
diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
index a4255a44c00..057071b5681 100644
--- a/arch/arm/cpu/armv7/iproc-common/timer.c
+++ b/arch/arm/cpu/armv7/iproc-common/timer.c
@@ -11,6 +11,7 @@
 #include <asm/iproc-common/timer.h>
 #include <asm/iproc-common/sysmap.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 static inline uint64_t timer_global_read(void)
 {
diff --git a/arch/arm/cpu/armv7/kona-common/clk-stubs.c b/arch/arm/cpu/armv7/kona-common/clk-stubs.c
index 19aa6c07358..634937d5b21 100644
--- a/arch/arm/cpu/armv7/kona-common/clk-stubs.c
+++ b/arch/arm/cpu/armv7/kona-common/clk-stubs.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <compiler.h>
+#include <asm/types.h>
 
 /*
  * These weak functions are available to kona architectures that don't
diff --git a/arch/arm/cpu/armv7/ls102xa/clock.c b/arch/arm/cpu/armv7/ls102xa/clock.c
index b7c2ec6b5d2..c8206ce7bd8 100644
--- a/arch/arm/cpu/armv7/ls102xa/clock.c
+++ b/arch/arm/cpu/armv7/ls102xa/clock.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -12,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <fsl_ifc.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index 5e922953c96..4548feca08c 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
@@ -23,6 +24,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "fsl_epu.h"
 
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index aef54ebf3c8..a70bbc1be1a 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 <compiler.h>
 #include <net.h>
 #include <stdio.h>
 #include <vsprintf.h>
@@ -25,6 +26,7 @@
 #include <fsl_sec.h>
 #include <dm.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/ls102xa/fsl_epu.c b/arch/arm/cpu/armv7/ls102xa/fsl_epu.c
index e31a4fb6c31..c6c6fb4e411 100644
--- a/arch/arm/cpu/armv7/ls102xa/fsl_epu.c
+++ b/arch/arm/cpu/armv7/ls102xa/fsl_epu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "fsl_epu.h"
 
diff --git a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c
index 2683b59a2a0..bf789cd6208 100644
--- a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c
+++ b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c
@@ -4,9 +4,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/immap_ls102xa.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include "fsl_ls1_serdes.h"
diff --git a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h
index 7382aef8ee3..6500f183c45 100644
--- a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h
+++ b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h
@@ -6,6 +6,7 @@
 #ifndef __FSL_LS1_SERDES_H
 #define __FSL_LS1_SERDES_H
 
+#include <asm/types.h>
 int is_serdes_prtcl_valid(int serdes, u32 prtcl);
 int serdes_lane_enabled(int lane);
 #endif /* __FSL_LS1_SERDES_H */
diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
index 4a4b3c6f232..e1c417926bb 100644
--- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
+++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c
@@ -5,12 +5,14 @@
  * This file implements LS102X platform PSCI SYSTEM-SUSPEND function
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/psci.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <fsl_immap.h>
+#include <asm/types.h>
 #include "fsl_epu.h"
 
 #define __secure __attribute__((section("._secure.text")))
diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c
index 3d313b1ad76..c29f7563b33 100644
--- a/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c
+++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/immap_ls102xa.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
diff --git a/arch/arm/cpu/armv7/ls102xa/soc.c b/arch/arm/cpu/armv7/ls102xa/soc.c
index caba26abcbe..35b627e789c 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 <compiler.h>
 #include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
@@ -13,6 +14,7 @@
 #include <asm/arch/ls102xa_stream_id.h>
 #include <fsl_csu.h>
 #include <fsl_ddr_sdram.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/cpu/armv7/ls102xa/spl.c b/arch/arm/cpu/armv7/ls102xa/spl.c
index 308536c3362..03a879a44c6 100644
--- a/arch/arm/cpu/armv7/ls102xa/spl.c
+++ b/arch/arm/cpu/armv7/ls102xa/spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <spl.h>
+#include <asm/types.h>
 
 u32 spl_boot_device(void)
 {
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index d79bf105f13..02f96ac2ea5 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -12,6 +12,7 @@
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c
index 57ab640e263..eba9d3f86dd 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 <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 
diff --git a/arch/arm/cpu/armv7/psci-common.c b/arch/arm/cpu/armv7/psci-common.c
index a328b2bc0e8..ce7d339eb20 100644
--- a/arch/arm/cpu/armv7/psci-common.c
+++ b/arch/arm/cpu/armv7/psci-common.c
@@ -22,6 +22,7 @@
 #include <asm/macro.h>
 #include <asm/psci.h>
 #include <asm/secure.h>
+#include <asm/types.h>
 #include <linux/linkage.h>
 
 static u32 psci_target_pc[CONFIG_ARMV7_PSCI_NR_CPUS] __secure_data = { 0 };
diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
index 0a00762ee06..1c5a2745e83 100644
--- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
+++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv7/s5p-common/pwm.c b/arch/arm/cpu/armv7/s5p-common/pwm.c
index 67c9208084d..8a48dc11eb1 100644
--- a/arch/arm/cpu/armv7/s5p-common/pwm.c
+++ b/arch/arm/cpu/armv7/s5p-common/pwm.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
 #include <asm/arch/clk.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 int pwm_enable(int pwm_id)
diff --git a/arch/arm/cpu/armv7/s5p-common/sromc.c b/arch/arm/cpu/armv7/s5p-common/sromc.c
index 0fc170936ae..0aed9e947e6 100644
--- a/arch/arm/cpu/armv7/s5p-common/sromc.c
+++ b/arch/arm/cpu/armv7/s5p-common/sromc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/sromc.h>
+#include <asm/types.h>
 
 /*
  * s5p_config_sromc() - select the proper SROMC Bank and configure the
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index 777a119438a..46d45d78c1a 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clk.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 /* Use the old PWM interface for now */
 #undef CONFIG_DM_PWM
diff --git a/arch/arm/cpu/armv7/s5p4418/cpu.c b/arch/arm/cpu/armv7/s5p4418/cpu.c
index 3c71a37a74b..699918d0625 100644
--- a/arch/arm/cpu/armv7/s5p4418/cpu.c
+++ b/arch/arm/cpu/armv7/s5p4418/cpu.c
@@ -17,6 +17,7 @@
 #include <asm/arch/tieoff.h>
 #include <cpu_func.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/stv0991/reset.c b/arch/arm/cpu/armv7/stv0991/reset.c
index 1be1dc486d4..58098d296e5 100644
--- a/arch/arm/cpu/armv7/stv0991/reset.c
+++ b/arch/arm/cpu/armv7/stv0991/reset.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/stv0991_wdru.h>
 #include <linux/delay.h>
+#include <linux/types.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 07033acb5c1..aad61d72add 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -13,6 +13,7 @@
 #include <asm/arch-stv0991/stv0991_cgu.h>
 #include <asm/arch-stv0991/stv0991_gpt.h>
 #include <linux/delay.h>
+#include <linux/types.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 5f21529bf2e..8f6532e344d 100644
--- a/arch/arm/cpu/armv7/sunxi/psci.c
+++ b/arch/arm/cpu/armv7/sunxi/psci.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <stdbool.h>
 #include <asm/cache.h>
+#include <asm/types.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 b7585996369..29193cf3ed6 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/syslib.c b/arch/arm/cpu/armv7/syslib.c
index 7e29636972d..7e0b7b0da98 100644
--- a/arch/arm/cpu/armv7/syslib.c
+++ b/arch/arm/cpu/armv7/syslib.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 /************************************************************
  * sdelay() - simple spin loop.  Will be constant time as
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 93418ce9a8c..80e22fcd624 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
@@ -22,6 +23,7 @@
 #ifdef CONFIG_FSL_ESDHC_IMX
 #include <fsl_esdhc_imx.h>
 #endif
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index a9c1a8fcebc..1afa86b558c 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 static struct pit_reg *cur_pit = (struct pit_reg *)PIT_BASE_ADDR;
 
diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c
index cf0954cb9b3..7aadb18cf1b 100644
--- a/arch/arm/cpu/armv7/virt-v7.c
+++ b/arch/arm/cpu/armv7/virt-v7.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
 #include <asm/armv7.h>
@@ -18,6 +19,7 @@
 #include <asm/secure.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static unsigned int read_id_pfr1(void)
 {
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index abed2e36df4..d81c0b12154 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Cache maintenance operation registers */
 
diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c
index 1d1c629c44c..ae8504fe5b2 100644
--- a/arch/arm/cpu/armv7m/cpu.c
+++ b/arch/arm/cpu/armv7m/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/armv7m.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /*
  * This is called right before passing control to
diff --git a/arch/arm/cpu/armv7m/mpu.c b/arch/arm/cpu/armv7m/mpu.c
index 81e7492f1c8..cdd4b7d2518 100644
--- a/arch/arm/cpu/armv7m/mpu.c
+++ b/arch/arm/cpu/armv7m/mpu.c
@@ -8,6 +8,7 @@
 #include <asm/armv7m.h>
 #include <asm/armv7_mpu.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #define V7M_MPU_CTRL_ENABLE		BIT(0)
 #define V7M_MPU_CTRL_DISABLE		(0 << 0)
diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
index 556eaf8c74a..cc1e13d74d2 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -27,6 +27,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 8add6ac333b..b128367e82f 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -8,9 +8,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -19,6 +21,7 @@
 #include <asm/armv8/mmu.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c
index 8c0a492a3fa..ae6453a3130 100644
--- a/arch/arm/cpu/armv8/cpu.c
+++ b/arch/arm/cpu/armv8/cpu.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/cache.h>
@@ -20,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * sdelay() - simple spin loop.
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index b11936548fb..edb7ef89a6c 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <asm/cache.h>
 #include <asm/setjmp.h>
+#include <linux/types.h>
 
 /**
  * entry_non_secure() - entry point when switching to non-secure mode
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 38ff2ce207d..56c076b70a9 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <fsl_ddr_sdram.h>
@@ -44,6 +45,7 @@
 #include <fsl_qbman.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_TFABOOT
 #include <env_internal.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.h b/arch/arm/cpu/armv8/fsl-layerscape/cpu.h
index dca5fd0f7dc..99f48597e2e 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.h
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.h
@@ -3,6 +3,7 @@
  * Copyright 2014-2015, Freescale Semiconductor
  */
 
+#include <asm/types.h>
 int fsl_qoriq_core_to_cluster(unsigned int core);
 u32 initiator_type(u32 cluster, int init_id);
 u32 cpu_mask(void);
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 09750dc2e88..9ef6ca33b47 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <efi_loader.h>
 #include <log.h>
 #include <stdio.h>
@@ -34,6 +35,7 @@
 #include <asm/arch/speed.h>
 #include <fsl_qbman.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc)
 {
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 86b2d335ab0..88f80433ab4 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
@@ -4,9 +4,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
index dce6cac4f7a..467856d3ab8 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -16,6 +17,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/soc.h>
 #include <fsl_ifc.h>
+#include <linux/types.h>
 #include "cpu.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index f79328394c9..806ac73b1a6 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -5,12 +5,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
index 36182fcf97a..9543f32771f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -19,6 +20,7 @@
 #include <asm/arch-fsl-layerscape/immap_lsch3.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/soc.h>
+#include <linux/types.h>
 #include "cpu.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/icid.c b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
index 5c378da0636..f4801173466 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/icid.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c
index 33d9a64e680..3db03fc450e 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/immap_lsch2.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
index 4d12ffae1bd..57c3652e376 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
@@ -11,6 +11,7 @@
 #include <asm/arch-fsl-layerscape/fsl_portals.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct icid_id_table icid_tbl[] = {
 	SET_USB_ICID(1, "snps,dwc3", FSL_USB1_STREAM_ID),
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c
index 1079dd8b95f..0785c3999a2 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_serdes.c
index 8a9ef8fef93..f3c5341d1aa 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_serdes.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/immap_lsch2.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c
index 0c1c40d04b3..0a5bd79ed10 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1046a_serdes.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/immap_lsch2.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1088a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1088a_serdes.c
index fb7680fdc5f..4fdbb796069 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1088a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1088a_serdes.c
@@ -4,9 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls2080a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls2080a_serdes.c
index b21da530dcf..fea83f0cce1 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls2080a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls2080a_serdes.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/lx2160a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/lx2160a_serdes.c
index 67c8f665146..6b2b0b4d79a 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/lx2160a_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/lx2160a_serdes.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct serdes_config {
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 0bccb38998c..396c2ba78dd 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <image.h>
 #include <log.h>
@@ -19,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "cpu.h"
 #include <asm/arch-fsl-layerscape/soc.h>
 #include <efi_loader.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 4aaeda367bf..3b5298b708b 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -3,6 +3,7 @@
  * Copyright 2016 NXP Semiconductor, Inc.
  */
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <config.h>
@@ -26,6 +27,7 @@
 #endif
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_NAND
 #include <nand.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 1bd6f2111c5..b53c06f35fa 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <fsl_immap.h>
@@ -44,6 +45,7 @@
 #if defined(CONFIG_TFABOOT) || defined(CONFIG_GIC_V3_ITS)
 DECLARE_GLOBAL_DATA_PTR;
 #endif
+#include <linux/types.h>
 
 #ifdef CONFIG_GIC_V3_ITS
 int ls_gic_rd_tables_init(void *blob)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 5ba5db3223a..a30b3547cc4 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <image.h>
@@ -22,6 +23,7 @@
 #include <asm/arch/soc.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index 8085a0351f3..d57680892c9 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -14,6 +14,7 @@
 #include <asm/psci.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
+#include <asm/types.h>
 
 /*
  * Issue the hypervisor call
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index f27a74b9d09..2f7fbc20e49 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/system.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/hisilicon/pinmux.c b/arch/arm/cpu/armv8/hisilicon/pinmux.c
index 5183e00a44c..4d90ea1130f 100644
--- a/arch/arm/cpu/armv8/hisilicon/pinmux.c
+++ b/arch/arm/cpu/armv8/hisilicon/pinmux.c
@@ -10,6 +10,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 struct hi6220_pinmux0_regs *pmx0 =
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index c58fb38e531..e3d151d3210 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <asm/arch/mc_me_regs.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include "cpu.h"
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.h b/arch/arm/cpu/armv8/s32v234/cpu.h
index 11c3a6b435e..a066661d90a 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.h
+++ b/arch/arm/cpu/armv8/s32v234/cpu.h
@@ -3,5 +3,6 @@
  * (C) Copyright 2014-2016, Freescale Semiconductor, Inc.
  */
 
+#include <asm/types.h>
 u32 cpu_mask(void);
 int cpu_numcores(void);
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index 575dbb1f609..0f43135b206 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 u32 get_cpu_rev(void)
 {
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 1b273db4f98..a2a7e52a975 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <errno.h>
 #include <fdt_support.h>
 #include <image.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
@@ -21,6 +23,7 @@
 #include <asm/macro.h>
 #include <asm/armv8/sec_firmware.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 extern void c_runtime_cpu_setup(void);
diff --git a/arch/arm/cpu/armv8/spl_data.c b/arch/arm/cpu/armv8/spl_data.c
index f8f9fe2e026..864b2ebe7a7 100644
--- a/arch/arm/cpu/armv8/spl_data.c
+++ b/arch/arm/cpu/armv8/spl_data.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 char __data_save_start[0] __section(.__data_save_start);
diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
index a2ec5e28c7d..97b6b3a0fd6 100644
--- a/arch/arm/cpu/pxa/cache.c
+++ b/arch/arm/cpu/pxa/cache.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2016 Vasily Khoruzhick <anarsoul at gmail.com>
  */
 
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <linux/types.h>
diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index ff56c3a82be..e54d06210d5 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <linux/compiler.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_CPU_PXA25X
 #if ((CONFIG_SYS_INIT_SP_ADDR) != 0xfffff800)
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 9a8b2361ad9..4bcef607c23 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -19,6 +19,7 @@
 #include <asm/system.h>
 #include <command.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Flush I/D-cache */
 static void cache_flush(void)
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c
index 91e100af1b6..f264d1b5601 100644
--- a/arch/arm/cpu/sa1100/cpu.c
+++ b/arch/arm/cpu/sa1100/cpu.c
@@ -19,6 +19,7 @@
 #include <irq_func.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 static void cache_flush(void);
 
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 5d597dd1ab4..e3227d7c25c 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -13,6 +13,7 @@
 #include <SA-1100.h>
 #include <time.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 static ulong get_timer_masked (void)
 {
diff --git a/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
index 7bcafba6f0b..6d09b53fb93 100644
--- a/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
+++ b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
@@ -10,6 +10,7 @@
 #ifndef __CLK_SYNTHESIZER_H
 #define __CLK_SYNTHESIZER_H
 
+#include <asm/types.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/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h
index dc7a9b188d3..a5b14ca4563 100644
--- a/arch/arm/include/asm/arch-am33xx/clock.h
+++ b/arch/arm/include/asm/arch-am33xx/clock.h
@@ -12,6 +12,7 @@
 
 #include <asm/arch/clocks_am33xx.h>
 #include <asm/arch/hardware.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_TI816X) || defined(CONFIG_TI814X)
 #include <asm/arch/clock_ti81xx.h>
diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
index 15a5b641ffa..4fd111ef700 100644
--- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
+++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
@@ -12,6 +12,7 @@
 
 #include <asm/arch/hardware.h>
 #include <asm/emif.h>
+#include <asm/types.h>
 
 /* AM335X EMIF Register values */
 #define VTP_CTRL_READY		(0x1 << 5)
diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h
index be17aad29ee..46fef0da51f 100644
--- a/arch/arm/include/asm/arch-am33xx/sys_proto.h
+++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h
@@ -11,6 +11,7 @@
 #define _SYS_PROTO_H_
 #include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/cpu.h>
+#include <linux/types.h>
 
 u32 get_cpu_rev(void);
 u32 get_sysboot_value(void);
diff --git a/arch/arm/include/asm/arch-armada100/cpu.h b/arch/arm/include/asm/arch-armada100/cpu.h
index cd5e5051d51..1565e101832 100644
--- a/arch/arm/include/asm/arch-armada100/cpu.h
+++ b/arch/arm/include/asm/arch-armada100/cpu.h
@@ -10,6 +10,7 @@
 
 #include <asm/io.h>
 #include <asm/system.h>
+#include <asm/types.h>
 
 /*
  * Main Power Management (MPMU) Registers
diff --git a/arch/arm/include/asm/arch-armada100/spi.h b/arch/arm/include/asm/arch-armada100/spi.h
index 873ba6e91c9..4a4dcd95f94 100644
--- a/arch/arm/include/asm/arch-armada100/spi.h
+++ b/arch/arm/include/asm/arch-armada100/spi.h
@@ -12,6 +12,7 @@
 #define __ARMADA100_SPI_H_
 
 #include <asm/arch/armada100.h>
+#include <asm/types.h>
 
 #define CAT_BASE_ADDR(x)	ARMD1_SSP ## x ## _BASE
 #define SSP_REG_BASE(x)		CAT_BASE_ADDR(x)
diff --git a/arch/arm/include/asm/arch-armada100/utmi-armada100.h b/arch/arm/include/asm/arch-armada100/utmi-armada100.h
index 28147f42acf..8511b875ea6 100644
--- a/arch/arm/include/asm/arch-armada100/utmi-armada100.h
+++ b/arch/arm/include/asm/arch-armada100/utmi-armada100.h
@@ -11,6 +11,7 @@
 #ifndef __UTMI_ARMADA100__
 #define __UTMI_ARMADA100__
 
+#include <asm/types.h>
 #define UTMI_PHY_BASE		0xD4206000
 
 /* utmi_ctrl - bits */
diff --git a/arch/arm/include/asm/arch-armv7/globaltimer.h b/arch/arm/include/asm/arch-armv7/globaltimer.h
index 2d9cf77980c..a4e8eaa4f96 100644
--- a/arch/arm/include/asm/arch-armv7/globaltimer.h
+++ b/arch/arm/include/asm/arch-armv7/globaltimer.h
@@ -6,6 +6,7 @@
 #ifndef _GLOBALTIMER_H_
 #define _GLOBALTIMER_H_
 
+#include <asm/types.h>
 struct globaltimer {
 	u32 cnt_l; /* 0x00 */
 	u32 cnt_h;
diff --git a/arch/arm/include/asm/arch-armv7/sysctrl.h b/arch/arm/include/asm/arch-armv7/sysctrl.h
index fc72fac8d87..e7e660362cf 100644
--- a/arch/arm/include/asm/arch-armv7/sysctrl.h
+++ b/arch/arm/include/asm/arch-armv7/sysctrl.h
@@ -7,6 +7,7 @@
 #define _SYSCTRL_H_
 
 /* System controller (SP810) register definitions */
+#include <asm/types.h>
 #define SP810_TIMER0_ENSEL	(1 << 15)
 #define SP810_TIMER1_ENSEL	(1 << 17)
 #define SP810_TIMER2_ENSEL	(1 << 19)
diff --git a/arch/arm/include/asm/arch-armv7/systimer.h b/arch/arm/include/asm/arch-armv7/systimer.h
index 04c41304581..4b9a29b0b4c 100644
--- a/arch/arm/include/asm/arch-armv7/systimer.h
+++ b/arch/arm/include/asm/arch-armv7/systimer.h
@@ -7,6 +7,7 @@
 #define _SYSTIMER_H_
 
 /* AMBA timer register base address */
+#include <asm/types.h>
 #define SYSTIMER_BASE		0x10011000
 
 #define SYSHZ_CLOCK		1000000		/* Timers -> 1Mhz */
diff --git a/arch/arm/include/asm/arch-armv7/wdt.h b/arch/arm/include/asm/arch-armv7/wdt.h
index e3fa16ffab5..593ec779490 100644
--- a/arch/arm/include/asm/arch-armv7/wdt.h
+++ b/arch/arm/include/asm/arch-armv7/wdt.h
@@ -7,6 +7,7 @@
 #define _WDT_H_
 
 /* Watchdog timer (SP805) register base address */
+#include <asm/types.h>
 #define WDT_BASE	0x100E5000
 
 #define WDT_EN		0x2
diff --git a/arch/arm/include/asm/arch-aspeed/scu_ast2500.h b/arch/arm/include/asm/arch-aspeed/scu_ast2500.h
index 8db4901cc9b..c2a1e122f9b 100644
--- a/arch/arm/include/asm/arch-aspeed/scu_ast2500.h
+++ b/arch/arm/include/asm/arch-aspeed/scu_ast2500.h
@@ -141,6 +141,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct ast2500_clk_priv {
 	struct ast2500_scu *scu;
 };
diff --git a/arch/arm/include/asm/arch-aspeed/sdram_ast2500.h b/arch/arm/include/asm/arch-aspeed/sdram_ast2500.h
index 0bc551fbecf..e66dff74e6b 100644
--- a/arch/arm/include/asm/arch-aspeed/sdram_ast2500.h
+++ b/arch/arm/include/asm/arch-aspeed/sdram_ast2500.h
@@ -97,6 +97,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct ast2500_sdrammc_regs {
 	u32 protection_key;
 	u32 config;
diff --git a/arch/arm/include/asm/arch-aspeed/timer.h b/arch/arm/include/asm/arch-aspeed/timer.h
index ff24e2f86e3..332c0f850b2 100644
--- a/arch/arm/include/asm/arch-aspeed/timer.h
+++ b/arch/arm/include/asm/arch-aspeed/timer.h
@@ -28,6 +28,7 @@
  * it this just one device.
  */
 
+#include <asm/types.h>
 struct ast_timer_counter {
 	u32 status;
 	u32 reload_val;
diff --git a/arch/arm/include/asm/arch-aspeed/wdt.h b/arch/arm/include/asm/arch-aspeed/wdt.h
index fb04d41d3cb..f71fcaad969 100644
--- a/arch/arm/include/asm/arch-aspeed/wdt.h
+++ b/arch/arm/include/asm/arch-aspeed/wdt.h
@@ -67,6 +67,7 @@
 	 WDT_RESET_ADC | WDT_RESET_GPIO | WDT_RESET_MISC)
 
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 struct ast_wdt {
 	u32 counter_status;
 	u32 counter_reload_val;
diff --git a/arch/arm/include/asm/arch-ep93xx/ep93xx.h b/arch/arm/include/asm/arch-ep93xx/ep93xx.h
index 272b64480d1..4f7561a74fe 100644
--- a/arch/arm/include/asm/arch-ep93xx/ep93xx.h
+++ b/arch/arm/include/asm/arch-ep93xx/ep93xx.h
@@ -31,6 +31,7 @@
 #define DMA_BASE			(EP93XX_AHB_BASE | DMA_OFFSET)
 
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 struct dma_channel {
 	uint32_t control;
 	uint32_t interrupt;
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/clock.h b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
index 41272e44bf3..6720f939d46 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/clock.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
@@ -9,6 +9,7 @@
 #define __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_
 
 #include <asm/u-boot.h>
+#include <linux/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
index 7759acdb8f6..6ef62fb8eea 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
@@ -17,6 +17,7 @@
 #define CONFIG_SYS_FSL_IFC_SIZE1	0x10000000
 #define CONFIG_SYS_FSL_IFC_SIZE1_1	0x400000
 #endif
+#include <asm/types.h>
 #define CONFIG_SYS_FSL_DRAM_BASE1	0x80000000
 #define CONFIG_SYS_FSL_DRAM_SIZE1	0x80000000
 #define CONFIG_SYS_FSL_QSPI_BASE2	0x400000000
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
index 1577e935a60..7713a515023 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
@@ -6,6 +6,7 @@
 #ifndef _FSL_PORTALS_H_
 #define _FSL_PORTALS_H_
 
+#include <asm/types.h>
 struct qportal_info {
 	u16	dicid;	/* DQRR ICID */
 	u16	ficid;	/* frame data ICID */
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h
index 8f436517569..86ef17b6283 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h
@@ -8,6 +8,7 @@
 #define __FSL_SERDES_H__
 
 #include <config.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_FSL_LSCH3
 enum srds_prtcl {
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/gpio.h b/arch/arm/include/asm/arch-fsl-layerscape/gpio.h
index 7ae5eee8b66..0b959b00fd1 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/gpio.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/gpio.h
@@ -13,6 +13,7 @@
 #ifndef __ASM_ARCH_MX85XX_GPIO_H
 #define __ASM_ARCH_MX85XX_GPIO_H
 
+#include <linux/types.h>
 struct mpc8xxx_gpio_plat {
 	ulong addr;
 	ulong size;
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 ae0504652bf..6a0081d46db 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 #define CONFIG_SYS_IMMR				0x01000000
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 baa9fa8529c..73d50e08926 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -292,6 +292,7 @@
 #define TP_INIT_PER_CLUSTER     4
 /* This is chassis generation 3 */
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct sys_info {
 	unsigned long freq_processor[CONFIG_MAX_CPUS];
 	/* frequency of platform PLL */
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/mp.h b/arch/arm/include/asm/arch-fsl-layerscape/mp.h
index faac8f11286..ad70074d18d 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/mp.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/mp.h
@@ -32,6 +32,7 @@
 
 #define id_to_core(x)	((x & 3) | (x >> 6))
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 extern u64 __real_cntfrq;
 extern void *secondary_boot_addr;
 extern void *secondary_boot_code_start;
diff --git a/arch/arm/include/asm/arch-hi6220/dwmmc.h b/arch/arm/include/asm/arch-hi6220/dwmmc.h
index cf51c178c3f..ae61e7109f6 100644
--- a/arch/arm/include/asm/arch-hi6220/dwmmc.h
+++ b/arch/arm/include/asm/arch-hi6220/dwmmc.h
@@ -4,4 +4,5 @@
  * Peter Griffin <peter.griffin at linaro.org>
  */
 
+#include <asm/types.h>
 int hi6220_dwmci_add_port(int index, u32 regbase, int bus_width);
diff --git a/arch/arm/include/asm/arch-hi6220/gpio.h b/arch/arm/include/asm/arch-hi6220/gpio.h
index c5ee359a3a1..c02a1fcb992 100644
--- a/arch/arm/include/asm/arch-hi6220/gpio.h
+++ b/arch/arm/include/asm/arch-hi6220/gpio.h
@@ -7,6 +7,7 @@
 #ifndef _HI6220_GPIO_H_
 #define _HI6220_GPIO_H_
 
+#include <linux/types.h>
 #define HI6220_GPIO_BASE(bank)	(((bank < 4) ? 0xf8011000 : \
 				0xf7020000 - 0x4000) + (0x1000 * bank))
 
diff --git a/arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h b/arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h
index 4b9a0d44acb..d719169c77f 100644
--- a/arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h
+++ b/arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h
@@ -7,6 +7,7 @@
 #ifndef __HI6220_ALWAYSON_H__
 #define __HI6220_ALWAYSON_H__
 
+#include <asm/types.h>
 #define ALWAYSON_CTRL_BASE			0xF7800000
 
 struct alwayson_sc_regs {
diff --git a/arch/arm/include/asm/arch-hi6220/pinmux.h b/arch/arm/include/asm/arch-hi6220/pinmux.h
index b4a9957e807..2673c1acc99 100644
--- a/arch/arm/include/asm/arch-hi6220/pinmux.h
+++ b/arch/arm/include/asm/arch-hi6220/pinmux.h
@@ -57,6 +57,7 @@
 /* maybe more registers, but highest used is 123 */
 #define REG_NUM 123
 
+#include <linux/types.h>
 struct hi6220_pinmux0_regs {
 	uint32_t	iomg[REG_NUM];
 };
diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h
index 75ff991248c..4e95c8a7a12 100644
--- a/arch/arm/include/asm/arch-imx/cpu.h
+++ b/arch/arm/include/asm/arch-imx/cpu.h
@@ -3,6 +3,7 @@
  * (C) Copyright 2014 Freescale Semiconductor, Inc.
  */
 
+#include <linux/types.h>
 #define MXC_CPU_MX23		0x23
 #define MXC_CPU_MX25		0x25
 #define MXC_CPU_MX27		0x27
diff --git a/arch/arm/include/asm/arch-imx8/clock.h b/arch/arm/include/asm/arch-imx8/clock.h
index bea157171fb..ce2d65a69d6 100644
--- a/arch/arm/include/asm/arch-imx8/clock.h
+++ b/arch/arm/include/asm/arch-imx8/clock.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_IMX8_CLOCK_H__
 
 /* Mainly for compatible to imx common code. */
+#include <asm/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_AHB_CLK,
diff --git a/arch/arm/include/asm/arch-imx8/gpio.h b/arch/arm/include/asm/arch-imx8/gpio.h
index 24cfde3c297..3ba211b0a61 100644
--- a/arch/arm/include/asm/arch-imx8/gpio.h
+++ b/arch/arm/include/asm/arch-imx8/gpio.h
@@ -18,4 +18,5 @@ struct gpio_regs {
 /* IMX8 the GPIO index is from 0 not 1 */
 #define IMX_GPIO_NR(port, index)		(((port) * 32) + ((index) & 31))
 
+#include <asm/types.h>
 #endif /* __ASM_ARCH_IMX8_GPIO_H */
diff --git a/arch/arm/include/asm/arch-imx8/image.h b/arch/arm/include/asm/arch-imx8/image.h
index c1e5700859d..1c6e05b49eb 100644
--- a/arch/arm/include/asm/arch-imx8/image.h
+++ b/arch/arm/include/asm/arch-imx8/image.h
@@ -6,6 +6,7 @@
 #ifndef __CONTAINER_HEADER_H_
 #define __CONTAINER_HEADER_H_
 
+#include <compiler.h>
 #include <linux/sizes.h>
 #include <linux/types.h>
 
diff --git a/arch/arm/include/asm/arch-imx8/iomux.h b/arch/arm/include/asm/arch-imx8/iomux.h
index 3acef1ea6ba..c7cab5770d3 100644
--- a/arch/arm/include/asm/arch-imx8/iomux.h
+++ b/arch/arm/include/asm/arch-imx8/iomux.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_IMX8_IOMUX_H__
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-imx8/sci/rpc.h b/arch/arm/include/asm/arch-imx8/sci/rpc.h
index 9f55904f442..04dd413aa04 100644
--- a/arch/arm/include/asm/arch-imx8/sci/rpc.h
+++ b/arch/arm/include/asm/arch-imx8/sci/rpc.h
@@ -10,6 +10,7 @@
 /* Note: Check SCFW API Released DOC before you want to modify something */
 /* Defines */
 
+#include <asm/types.h>
 #define SCFW_API_VERSION_MAJOR  1U
 #define SCFW_API_VERSION_MINOR  15U
 
diff --git a/arch/arm/include/asm/arch-imx8/sci/sci.h b/arch/arm/include/asm/arch-imx8/sci/sci.h
index 1c29209b399..ff7be2184f3 100644
--- a/arch/arm/include/asm/arch-imx8/sci/sci.h
+++ b/arch/arm/include/asm/arch-imx8/sci/sci.h
@@ -16,6 +16,7 @@
 #include <asm/arch/sci/rpc.h>
 #include <dt-bindings/soc/imx_rsrc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static inline int sc_err_to_linux(sc_err_t err)
 {
diff --git a/arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h b/arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h
index 3629eb68d7a..4fb7c01f9c4 100644
--- a/arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h
+++ b/arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h
@@ -7,6 +7,7 @@
 #define SC_MISC_API_H
 
 /* Defines for sc_misc_boot_status_t */
+#include <asm/types.h>
 #define SC_MISC_BOOT_STATUS_SUCCESS	0U	/* Success */
 #define SC_MISC_BOOT_STATUS_SECURITY	1U	/* Security violation */
 
diff --git a/arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h b/arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h
index 9008b85c6f6..ca80fd3927f 100644
--- a/arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h
+++ b/arch/arm/include/asm/arch-imx8/sci/svc/pm/api.h
@@ -7,6 +7,7 @@
 #define SC_PM_API_H
 
 /* Defines for sc_pm_power_mode_t */
+#include <asm/types.h>
 #define SC_PM_PW_MODE_OFF	0U /* Power off */
 #define SC_PM_PW_MODE_STBY	1U /* Power in standby */
 #define SC_PM_PW_MODE_LP	2U /* Power in low-power */
diff --git a/arch/arm/include/asm/arch-imx8/sci/svc/rm/api.h b/arch/arm/include/asm/arch-imx8/sci/svc/rm/api.h
index ed303881e73..4783682e4de 100644
--- a/arch/arm/include/asm/arch-imx8/sci/svc/rm/api.h
+++ b/arch/arm/include/asm/arch-imx8/sci/svc/rm/api.h
@@ -7,6 +7,7 @@
 #define SC_RM_API_H
 
 #include <asm/arch/sci/types.h>
+#include <asm/types.h>
 
 /* Defines for type widths */
 #define SC_RM_PARTITION_W   5U      /* Width of sc_rm_pt_t */
diff --git a/arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h b/arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h
index 3ed05842d99..524f857bfb7 100644
--- a/arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h
+++ b/arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h
@@ -9,6 +9,7 @@
 /* Includes */
 
 #include <asm/arch/sci/types.h>
+#include <asm/types.h>
 
 /* Defines */
 #define SC_SECO_AUTH_CONTAINER          0U   /* Authenticate container */
diff --git a/arch/arm/include/asm/arch-imx8m/clock.h b/arch/arm/include/asm/arch-imx8m/clock.h
index 848a93ec3f2..2bb81f2bddf 100644
--- a/arch/arm/include/asm/arch-imx8m/clock.h
+++ b/arch/arm/include/asm/arch-imx8m/clock.h
@@ -7,6 +7,7 @@
 
 #include <stdbool.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_IMX8MQ
 #include <asm/arch/clock_imx8mq.h>
diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
index 63b14b9ca58..c2f530bf090 100644
--- a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
+++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
@@ -9,6 +9,7 @@
 #define _ASM_ARCH_IMX8MM_CLOCK_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-imx8m/ddr.h b/arch/arm/include/asm/arch-imx8m/ddr.h
index 0f1e832c038..790e9d9dfb2 100644
--- a/arch/arm/include/asm/arch-imx8m/ddr.h
+++ b/arch/arm/include/asm/arch-imx8m/ddr.h
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/types.h>
 #include <asm/arch/ddr.h>
+#include <linux/types.h>
 
 #define DDRC_DDR_SS_GPR0		0x3d000000
 #define DDRC_IPS_BASE_ADDR_0		0x3f400000
diff --git a/arch/arm/include/asm/arch-imxrt/gpio.h b/arch/arm/include/asm/arch-imxrt/gpio.h
index da31a7438aa..1752bd23fe8 100644
--- a/arch/arm/include/asm/arch-imxrt/gpio.h
+++ b/arch/arm/include/asm/arch-imxrt/gpio.h
@@ -16,4 +16,5 @@ struct gpio_regs {
 };
 #endif
 
+#include <asm/types.h>
 #endif /* __ASM_ARCH_GPIO_H__ */
diff --git a/arch/arm/include/asm/arch-lpc32xx/dma.h b/arch/arm/include/asm/arch-lpc32xx/dma.h
index d69e3c4664d..f480f7c7cd8 100644
--- a/arch/arm/include/asm/arch-lpc32xx/dma.h
+++ b/arch/arm/include/asm/arch-lpc32xx/dma.h
@@ -12,6 +12,7 @@
 #define _LPC32XX_DMA_H
 
 /*
+#include <asm/types.h>
  * DMA linked list structure used with a channel's LLI register;
  * refer to UM10326, "LPC32x0 and LPC32x0/01 User manual" - Rev. 3
  * tables 84, 85, 86 & 87 for details.
diff --git a/arch/arm/include/asm/arch-lpc32xx/gpio.h b/arch/arm/include/asm/arch-lpc32xx/gpio.h
index 93e7a887521..332ae6f8850 100644
--- a/arch/arm/include/asm/arch-lpc32xx/gpio.h
+++ b/arch/arm/include/asm/arch-lpc32xx/gpio.h
@@ -10,6 +10,7 @@
  * GPIO Register map for LPC32xx
  */
 
+#include <asm/types.h>
 struct gpio_regs {
 	u32 p3_inp_state;
 	u32 p3_outp_set;
diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h
index f39b14001b6..3f9ef1096d3 100644
--- a/arch/arm/include/asm/arch-lpc32xx/i2c.h
+++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h
@@ -2,6 +2,7 @@
 #define _LPC32XX_I2C_H
 
 #include <asm/types.h>
+#include <linux/types.h>
 
 /* i2c register set */
 struct lpc32xx_i2c_base {
diff --git a/arch/arm/include/asm/arch-lpc32xx/mux.h b/arch/arm/include/asm/arch-lpc32xx/mux.h
index d661e8236f3..aff08caae19 100644
--- a/arch/arm/include/asm/arch-lpc32xx/mux.h
+++ b/arch/arm/include/asm/arch-lpc32xx/mux.h
@@ -10,6 +10,7 @@
  * MUX register map for LPC32xx
  */
 
+#include <asm/types.h>
 struct mux_regs {
 	u32 reserved1[10];
 	u32 p2_mux_set;
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index bfb58d75455..53b002f7c95 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -8,6 +8,7 @@
 #define __ASM_ARCH_LS102XA_CLOCK_H_
 
 #include <asm/u-boot.h>
+#include <linux/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_UART_CLK,
diff --git a/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h b/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h
index d99a6f318f8..b418a906f9c 100644
--- a/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h
+++ b/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h
@@ -7,6 +7,7 @@
 #define __FSL_SERDES_H
 
 #include <config.h>
+#include <asm/types.h>
 
 enum srds_prtcl {
 	/*
diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
index 4bae3f4ed5d..bdc43d34b1d 100644
--- a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
+++ b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_LS102XA_IMMAP_H_
 #include <fsl_immap.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define SVR_MAJ(svr)		(((svr) >>  4) & 0xf)
 #define SVR_MIN(svr)		(((svr) >>  0) & 0xf)
diff --git a/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h b/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h
index 93b0a26091e..06df4c59043 100644
--- a/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h
+++ b/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h
@@ -7,6 +7,7 @@
 #define __FSL_LS102XA_STREAM_ID_H_
 
 #include <fsl_sec.h>
+#include <linux/types.h>
 
 #define SET_LIODN_ENTRY_1(name, idA, off, compatoff) \
 	{ .compat = name, \
diff --git a/arch/arm/include/asm/arch-mediatek/reset.h b/arch/arm/include/asm/arch-mediatek/reset.h
index 9704666d24e..83fe9d5fbc2 100644
--- a/arch/arm/include/asm/arch-mediatek/reset.h
+++ b/arch/arm/include/asm/arch-mediatek/reset.h
@@ -7,6 +7,7 @@
 #define __MEDIATEK_RESET_H
 
 #include <dm.h>
+#include <asm/types.h>
 
 int mediatek_reset_bind(struct udevice *pdev, u32 regofs, u32 num_regs);
 
diff --git a/arch/arm/include/asm/arch-meson/clock-gx.h b/arch/arm/include/asm/arch-meson/clock-gx.h
index 13a2e7688fc..2a9bd52102a 100644
--- a/arch/arm/include/asm/arch-meson/clock-gx.h
+++ b/arch/arm/include/asm/arch-meson/clock-gx.h
@@ -13,6 +13,7 @@
  * Those offsets must be multiplied by 4 before adding them to the base address
  * to get the right value
  */
+#include <linux/types.h>
 #define SCR				0x2C /* 0x0b offset in data sheet */
 #define TIMEOUT_VALUE			0x3c /* 0x0f offset in data sheet */
 
diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h
index f3ae46a6d6b..53a93347c18 100644
--- a/arch/arm/include/asm/arch-meson/sm.h
+++ b/arch/arm/include/asm/arch-meson/sm.h
@@ -6,6 +6,7 @@
 #ifndef __MESON_SM_H__
 #define __MESON_SM_H__
 
+#include <linux/types.h>
 ssize_t meson_sm_read_efuse(uintptr_t offset, void *buffer, size_t size);
 
 #define SM_SERIAL_SIZE	12
diff --git a/arch/arm/include/asm/arch-mvebu/spi.h b/arch/arm/include/asm/arch-mvebu/spi.h
index 58b6c32c4d8..7c0d55bfe6c 100644
--- a/arch/arm/include/asm/arch-mvebu/spi.h
+++ b/arch/arm/include/asm/arch-mvebu/spi.h
@@ -11,6 +11,7 @@
 #define __KW_SPI_H__
 
 /* SPI Registers on kirkwood SOC */
+#include <asm/types.h>
 struct kwspi_registers {
 	u32 ctrl;	/* 0x10600 */
 	u32 cfg;	/* 0x10604 */
diff --git a/arch/arm/include/asm/arch-mx27/gpio.h b/arch/arm/include/asm/arch-mx27/gpio.h
index 9f342eb7f71..fcc57071ce9 100644
--- a/arch/arm/include/asm/arch-mx27/gpio.h
+++ b/arch/arm/include/asm/arch-mx27/gpio.h
@@ -9,6 +9,7 @@
 #define __ASM_ARCH_MX27_GPIO_H
 
 /* GPIO registers */
+#include <asm/types.h>
 struct gpio_regs {
 	u32 gpio_dir; /* DDIR */
 	u32 ocr1;
diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h b/arch/arm/include/asm/arch-mx27/imx-regs.h
index d39f6b03508..dd2773a8878 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
@@ -11,6 +11,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 extern void imx_gpio_mode (int gpio_mode);
 
 #ifdef CONFIG_MXC_UART
diff --git a/arch/arm/include/asm/arch-mx27/regs-rtc.h b/arch/arm/include/asm/arch-mx27/regs-rtc.h
index 8434f4c1cb1..ee7a8c29008 100644
--- a/arch/arm/include/asm/arch-mx27/regs-rtc.h
+++ b/arch/arm/include/asm/arch-mx27/regs-rtc.h
@@ -9,6 +9,7 @@
 #define __MX27_REGS_RTC_H__
 
 #ifndef	__ASSEMBLY__
+#include <asm/types.h>
 struct rtc_regs {
 	u32 hourmin;
 	u32 seconds;
diff --git a/arch/arm/include/asm/arch-mx31/clock.h b/arch/arm/include/asm/arch-mx31/clock.h
index e99e115f79e..5b084dc359b 100644
--- a/arch/arm/include/asm/arch-mx31/clock.h
+++ b/arch/arm/include/asm/arch-mx31/clock.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
+#include <asm/types.h>
 #define MXC_HCLK	CONFIG_MX31_HCLK_FREQ
 
 #define MXC_CLK32	CONFIG_MX31_CLK32
diff --git a/arch/arm/include/asm/arch-mx31/sys_proto.h b/arch/arm/include/asm/arch-mx31/sys_proto.h
index a530afcbc91..72ce987ab20 100644
--- a/arch/arm/include/asm/arch-mx31/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx31/sys_proto.h
@@ -8,6 +8,7 @@
 #define _MX31_SYS_PROTO_H_
 
 #include <asm/mach-imx/sys_proto.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 struct mxc_weimcs {
diff --git a/arch/arm/include/asm/arch-mx35/clock.h b/arch/arm/include/asm/arch-mx35/clock.h
index cb0b53a69f4..e2b0f661cc7 100644
--- a/arch/arm/include/asm/arch-mx35/clock.h
+++ b/arch/arm/include/asm/arch-mx35/clock.h
@@ -19,6 +19,7 @@
 #define MXC_CLK32	32768
 #endif
 
+#include <asm/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK,
 	MXC_AHB_CLK,
diff --git a/arch/arm/include/asm/arch-mx35/sys_proto.h b/arch/arm/include/asm/arch-mx35/sys_proto.h
index 6e8b84128bc..20b18d058cb 100644
--- a/arch/arm/include/asm/arch-mx35/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx35/sys_proto.h
@@ -8,6 +8,7 @@
 #define _MX35_SYS_PROTO_H_
 
 #include <asm/mach-imx/sys_proto.h>
+#include <asm/types.h>
 
 void mx3_setup_sdram_bank(u32 start_address, u32 ddr2_config, u32 row,
 			  u32 col, u32 dsize, u32 refresh);
diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
index 86aeb5d5610..ad6b56c9bab 100644
--- a/arch/arm/include/asm/arch-mx5/clock.h
+++ b/arch/arm/include/asm/arch-mx5/clock.h
@@ -20,6 +20,7 @@
 #endif
 
 #include <stdbool.h>
+#include <asm/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_AHB_CLK,
diff --git a/arch/arm/include/asm/arch-mx5/crm_regs.h b/arch/arm/include/asm/arch-mx5/crm_regs.h
index 9d54ab7fb07..913318e314f 100644
--- a/arch/arm/include/asm/arch-mx5/crm_regs.h
+++ b/arch/arm/include/asm/arch-mx5/crm_regs.h
@@ -6,6 +6,7 @@
 #ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__
 #define __ARCH_ARM_MACH_MX51_CRM_REGS_H__
 
+#include <asm/types.h>
 #define MXC_CCM_BASE	CCM_BASE_ADDR
 
 /* DPLL register mapping structure */
diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h
index 4174f244afa..3bbd049dd91 100644
--- a/arch/arm/include/asm/arch-mx6/crm_regs.h
+++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
@@ -18,6 +18,7 @@
 #define PMU_MISC2		0x020C8170
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct mxc_ccm_reg {
 	u32 ccr;	/* 0x0000 */
 	u32 ccdr;
diff --git a/arch/arm/include/asm/arch-mx6/mx6-ddr.h b/arch/arm/include/asm/arch-mx6/mx6-ddr.h
index dbc97b25df8..069dd7ce8fc 100644
--- a/arch/arm/include/asm/arch-mx6/mx6-ddr.h
+++ b/arch/arm/include/asm/arch-mx6/mx6-ddr.h
@@ -23,6 +23,7 @@
 #else
 #error "Please select cpu"
 #endif	/* CONFIG_MX6SL */
+#include <asm/types.h>
 #endif	/* CONFIG_MX6UL */
 #endif	/* CONFIG_MX6SX */
 #endif	/* CONFIG_MX6DL or CONFIG_MX6S */
diff --git a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
index 71ad0e307c4..5009609022e 100644
--- a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
+++ b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
@@ -14,6 +14,7 @@ void imx_setup_hdmi(void);
 /*
  * Hdmi controller registers
  */
+#include <asm/types.h>
 struct hdmi_regs {
 	/*Identification Registers */
 	u8 design_id;			/* 0x000 */
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 1e5fa1a75eb..eddce1aeba9 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -9,6 +9,7 @@
 
 #include <asm/mach-imx/sys_proto.h>
 #include <asm/arch/iomux.h>
+#include <asm/types.h>
 
 #define USBPHY_PWD		0x00000000
 
diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index 48c7c3367a5..cf0b0ce9654 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -10,6 +10,7 @@
 #define _ASM_ARCH_CLOCK_H
 
 #include <asm/arch/crm_regs.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_MX7_HCLK
 #define MXC_HCLK	CONFIG_SYS_MX7_HCLK
diff --git a/arch/arm/include/asm/arch-mx7/clock_slice.h b/arch/arm/include/asm/arch-mx7/clock_slice.h
index 1eac3bec5cb..d7910a8d96c 100644
--- a/arch/arm/include/asm/arch-mx7/clock_slice.h
+++ b/arch/arm/include/asm/arch-mx7/clock_slice.h
@@ -10,6 +10,7 @@
 #define _ASM_ARCH_CLOCK_SLICE_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 enum root_pre_div {
 	CLK_ROOT_PRE_DIV1 = 0,
 	CLK_ROOT_PRE_DIV2,
diff --git a/arch/arm/include/asm/arch-mx7/crm_regs.h b/arch/arm/include/asm/arch-mx7/crm_regs.h
index f3515fab031..7c72f294e63 100644
--- a/arch/arm/include/asm/arch-mx7/crm_regs.h
+++ b/arch/arm/include/asm/arch-mx7/crm_regs.h
@@ -20,6 +20,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 struct mxc_ccm_ccgr {
 	uint32_t ccgr;
 	uint32_t ccgr_set;
diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
index f37419c07f1..f3b0a3f9be5 100644
--- a/arch/arm/include/asm/arch-mx7/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
@@ -226,6 +226,7 @@
 #include <asm/mach-imx/regs-lcdif.h>
 #include <asm/types.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
 
diff --git a/arch/arm/include/asm/arch-mx7/mx7-ddr.h b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
index bea5dd8ec5e..8a4d21ed819 100644
--- a/arch/arm/include/asm/arch-mx7/mx7-ddr.h
+++ b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
@@ -11,6 +11,7 @@
 #define __ASM_ARCH_MX7_DDR_H__
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-mx7ulp/clock.h b/arch/arm/include/asm/arch-mx7ulp/clock.h
index 92d4463dff5..5025fa39cfd 100644
--- a/arch/arm/include/asm/arch-mx7ulp/clock.h
+++ b/arch/arm/include/asm/arch-mx7ulp/clock.h
@@ -8,6 +8,7 @@
 
 #include <asm/arch/pcc.h>
 #include <asm/arch/scg.h>
+#include <asm/types.h>
 
 /* Mainly for compatible to imx common code. */
 enum mxc_clock {
diff --git a/arch/arm/include/asm/arch-mx7ulp/gpio.h b/arch/arm/include/asm/arch-mx7ulp/gpio.h
index 7c625609bac..b20b8ba26b9 100644
--- a/arch/arm/include/asm/arch-mx7ulp/gpio.h
+++ b/arch/arm/include/asm/arch-mx7ulp/gpio.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_ARCH_MX7ULP_GPIO_H
 #define __ASM_ARCH_MX7ULP_GPIO_H
 
+#include <asm/types.h>
 struct gpio_regs {
 	u32 gpio_pdor;
 	u32 gpio_psor;
diff --git a/arch/arm/include/asm/arch-mx7ulp/pcc.h b/arch/arm/include/asm/arch-mx7ulp/pcc.h
index 25d10fb7d1a..c1e12009a2e 100644
--- a/arch/arm/include/asm/arch-mx7ulp/pcc.h
+++ b/arch/arm/include/asm/arch-mx7ulp/pcc.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <asm/arch/scg.h>
+#include <asm/types.h>
 
 /* PCC2 */
 
diff --git a/arch/arm/include/asm/arch-mx7ulp/scg.h b/arch/arm/include/asm/arch-mx7ulp/scg.h
index b4d92d1ed44..0be3ae1dc27 100644
--- a/arch/arm/include/asm/arch-mx7ulp/scg.h
+++ b/arch/arm/include/asm/arch-mx7ulp/scg.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_CLK_DEBUG
 #define clk_debug(fmt, args...)	printf(fmt, ##args)
diff --git a/arch/arm/include/asm/arch-mxs/clock.h b/arch/arm/include/asm/arch-mxs/clock.h
index ee56d10fec2..bfaa72ce3f2 100644
--- a/arch/arm/include/asm/arch-mxs/clock.h
+++ b/arch/arm/include/asm/arch-mxs/clock.h
@@ -9,6 +9,7 @@
 #ifndef __CLOCK_H__
 #define __CLOCK_H__
 
+#include <linux/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_AHB_CLK,
diff --git a/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h b/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h
index 50fdc9cd032..96976ed0a4a 100644
--- a/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h
+++ b/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h
@@ -15,6 +15,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_clkctrl_regs {
 	mxs_reg_32(hw_clkctrl_pll0ctrl0)	/* 0x00 */
 	uint32_t	hw_clkctrl_pll0ctrl1;	/* 0x10 */
diff --git a/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h b/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h
index caef9e4b1fc..494757fe622 100644
--- a/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h
+++ b/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h
@@ -15,6 +15,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_clkctrl_regs {
 	mxs_reg_32(hw_clkctrl_pll0ctrl0)	/* 0x00 */
 	uint32_t	hw_clkctrl_pll0ctrl1;	/* 0x10 */
diff --git a/arch/arm/include/asm/arch-mxs/regs-digctl.h b/arch/arm/include/asm/arch-mxs/regs-digctl.h
index 219f58ba75f..63735af5ec3 100644
--- a/arch/arm/include/asm/arch-mxs/regs-digctl.h
+++ b/arch/arm/include/asm/arch-mxs/regs-digctl.h
@@ -11,6 +11,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_digctl_regs {
 	mxs_reg_32(hw_digctl_ctrl)				/* 0x000 */
 	mxs_reg_32(hw_digctl_status)				/* 0x010 */
diff --git a/arch/arm/include/asm/arch-mxs/regs-pinctrl.h b/arch/arm/include/asm/arch-mxs/regs-pinctrl.h
index 134d436ee92..d06b3b83914 100644
--- a/arch/arm/include/asm/arch-mxs/regs-pinctrl.h
+++ b/arch/arm/include/asm/arch-mxs/regs-pinctrl.h
@@ -15,6 +15,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_pinctrl_regs {
 	mxs_reg_32(hw_pinctrl_ctrl)		/* 0x0 */
 
diff --git a/arch/arm/include/asm/arch-mxs/regs-power-mx23.h b/arch/arm/include/asm/arch-mxs/regs-power-mx23.h
index a0dc7810230..9cfb7223b99 100644
--- a/arch/arm/include/asm/arch-mxs/regs-power-mx23.h
+++ b/arch/arm/include/asm/arch-mxs/regs-power-mx23.h
@@ -11,6 +11,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_power_regs {
 	mxs_reg_32(hw_power_ctrl)
 	mxs_reg_32(hw_power_5vctrl)
diff --git a/arch/arm/include/asm/arch-mxs/regs-power-mx28.h b/arch/arm/include/asm/arch-mxs/regs-power-mx28.h
index 39250c506d0..7ceb576e6f5 100644
--- a/arch/arm/include/asm/arch-mxs/regs-power-mx28.h
+++ b/arch/arm/include/asm/arch-mxs/regs-power-mx28.h
@@ -11,6 +11,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_power_regs {
 	mxs_reg_32(hw_power_ctrl)
 	mxs_reg_32(hw_power_5vctrl)
diff --git a/arch/arm/include/asm/arch-mxs/regs-ssp.h b/arch/arm/include/asm/arch-mxs/regs-ssp.h
index eeb7e7f44c0..947a3624c2f 100644
--- a/arch/arm/include/asm/arch-mxs/regs-ssp.h
+++ b/arch/arm/include/asm/arch-mxs/regs-ssp.h
@@ -86,6 +86,7 @@ static inline int mxs_ssp_clock_by_bus(unsigned int clock)
 #endif
 }
 
+#include <linux/types.h>
 static inline struct mxs_ssp_regs *mxs_ssp_regs_by_bus(unsigned int port)
 {
 	switch (port) {
diff --git a/arch/arm/include/asm/arch-mxs/regs-usb.h b/arch/arm/include/asm/arch-mxs/regs-usb.h
index 8d5168dd8ea..d21c26428b0 100644
--- a/arch/arm/include/asm/arch-mxs/regs-usb.h
+++ b/arch/arm/include/asm/arch-mxs/regs-usb.h
@@ -9,6 +9,7 @@
 #ifndef __REGS_USB_H__
 #define __REGS_USB_H__
 
+#include <linux/types.h>
 struct mxs_usb_regs {
 	uint32_t		hw_usbctrl_id;			/* 0x000 */
 	uint32_t		hw_usbctrl_hwgeneral;		/* 0x004 */
diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h
index 85374e2b87c..5ade99aa5dc 100644
--- a/arch/arm/include/asm/arch-mxs/sys_proto.h
+++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
@@ -11,6 +11,7 @@
 
 #include <asm/mach-imx/sys_proto.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 int mxsmmc_initialize(struct bd_info *bis, int id, int (*wp)(int),
 		      int (*cd)(int));
diff --git a/arch/arm/include/asm/arch-omap3/dma.h b/arch/arm/include/asm/arch-omap3/dma.h
index d26e490d2db..2df9d075870 100644
--- a/arch/arm/include/asm/arch-omap3/dma.h
+++ b/arch/arm/include/asm/arch-omap3/dma.h
@@ -7,6 +7,7 @@
  */
 
 /* Functions */
+#include <linux/types.h>
 void omap3_dma_init(void);
 int omap3_dma_conf_transfer(uint32_t chan, uint32_t *src, uint32_t *dst,
 		uint32_t sze);
diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h
index 8bf6b4895fc..c16156b749e 100644
--- a/arch/arm/include/asm/arch-omap3/dss.h
+++ b/arch/arm/include/asm/arch-omap3/dss.h
@@ -29,6 +29,7 @@
 #define DSS_H
 
 /* DSS Base Registers */
+#include <asm/types.h>
 #define OMAP3_DSS_BASE		0x48050000
 #define OMAP3_DISPC_BASE	0x48050400
 #define OMAP3_VENC_BASE		0x48050C00
diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h
index 7adc134a752..a09b5a2ca79 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -12,6 +12,7 @@
 #define CS1		0x1 /* mirror CS1 regs appear offset 0x30 from CS0 */
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 enum {
 	STACKED = 0,
 	IP_DDR = 1,
diff --git a/arch/arm/include/asm/arch-omap3/musb.h b/arch/arm/include/asm/arch-omap3/musb.h
index cb3f5d89daa..58a5616ee08 100644
--- a/arch/arm/include/asm/arch-omap3/musb.h
+++ b/arch/arm/include/asm/arch-omap3/musb.h
@@ -6,6 +6,7 @@
 
 #ifndef __ASM_ARCH_OMAP3_MUSB_H
 #define __ASM_ARCH_OMAP3_MUSB_H
+#include <asm/types.h>
 void am35x_musb_reset(struct udevice *dev);
 void am35x_musb_phy_power(struct udevice *dev, u8 on);
 void am35x_musb_clear_irq(struct udevice *dev);
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 32ac0335158..7fc9b09337a 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -8,6 +8,7 @@
 #define _SYS_PROTO_H_
 #include <linux/mtd/omap_gpmc.h>
 #include <asm/omap_common.h>
+#include <linux/types.h>
 
 typedef struct {
 	u32 mtype;
diff --git a/arch/arm/include/asm/arch-omap4/clock.h b/arch/arm/include/asm/arch-omap4/clock.h
index 0a626fe647a..d2e14ff8962 100644
--- a/arch/arm/include/asm/arch-omap4/clock.h
+++ b/arch/arm/include/asm/arch-omap4/clock.h
@@ -8,6 +8,7 @@
 #ifndef _CLOCKS_OMAP4_H_
 #define _CLOCKS_OMAP4_H_
 #include <asm/omap_common.h>
+#include <asm/types.h>
 
 /*
  * Assuming a maximum of 1.5 GHz ARM speed and a minimum of 2 cycles per
diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h b/arch/arm/include/asm/arch-omap4/sys_proto.h
index b2a68876585..51bc1b82948 100644
--- a/arch/arm/include/asm/arch-omap4/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap4/sys_proto.h
@@ -11,6 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/omap_common.h>
+#include <asm/types.h>
 #include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/mux_omap4.h>
 #include <asm/ti-common/sys_proto.h>
diff --git a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
index ea2f113f98d..bdfc026dc05 100644
--- a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
+++ b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
@@ -10,6 +10,7 @@
 #define _DRA7_IODELAY_H_
 
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 
 /* CONFIG_REG_0 */
 #define CFG_REG_0_OFFSET		0xC
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h
index 80b0c93b5eb..069515e253d 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -14,6 +14,7 @@
 #include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/clock.h>
 #include <asm/ti-common/sys_proto.h>
+#include <linux/types.h>
 
 /*
  * Structure for Iodelay configuration registers.
diff --git a/arch/arm/include/asm/arch-pxa/pxa.h b/arch/arm/include/asm/arch-pxa/pxa.h
index 428a848e157..7fd0ebad5c0 100644
--- a/arch/arm/include/asm/arch-pxa/pxa.h
+++ b/arch/arm/include/asm/arch-pxa/pxa.h
@@ -8,6 +8,7 @@
 #ifndef	__PXA_H__
 #define	__PXA_H__
 
+#include <linux/types.h>
 #define PXA255_A0	0x00000106
 #define PXA250_C0	0x00000105
 #define PXA250_B2	0x00000104
diff --git a/arch/arm/include/asm/arch-pxa/regs-mmc.h b/arch/arm/include/asm/arch-pxa/regs-mmc.h
index 6d9a736d9c0..7ed111cf99a 100644
--- a/arch/arm/include/asm/arch-pxa/regs-mmc.h
+++ b/arch/arm/include/asm/arch-pxa/regs-mmc.h
@@ -6,6 +6,7 @@
 #ifndef __REGS_MMC_H__
 #define __REGS_MMC_H__
 
+#include <linux/types.h>
 #define MMC0_BASE	0x41100000
 #define MMC1_BASE	0x42000000
 
diff --git a/arch/arm/include/asm/arch-pxa/regs-uart.h b/arch/arm/include/asm/arch-pxa/regs-uart.h
index bdd0a4757b5..fc7690ee4f3 100644
--- a/arch/arm/include/asm/arch-pxa/regs-uart.h
+++ b/arch/arm/include/asm/arch-pxa/regs-uart.h
@@ -6,6 +6,7 @@
 #ifndef	__REGS_UART_H__
 #define	__REGS_UART_H__
 
+#include <linux/types.h>
 #define	FFUART_BASE		0x40100000
 #define	BTUART_BASE		0x40200000
 #define	STUART_BASE		0x40700000
diff --git a/arch/arm/include/asm/arch-pxa/regs-usb.h b/arch/arm/include/asm/arch-pxa/regs-usb.h
index e46887c9ed4..60e56458087 100644
--- a/arch/arm/include/asm/arch-pxa/regs-usb.h
+++ b/arch/arm/include/asm/arch-pxa/regs-usb.h
@@ -8,6 +8,7 @@
 #ifndef __REGS_USB_H__
 #define __REGS_USB_H__
 
+#include <linux/types.h>
 struct pxa25x_udc_regs {
 	/* UDC Control Register */
 	uint32_t	udccr; /* 0x000 */
diff --git a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
index 08af4f547dd..d8feb8bff4e 100644
--- a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
+++ b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_CRU_RK3308_H
 
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h
index 0da78f30b61..a1937c251f1 100644
--- a/arch/arm/include/asm/arch-rockchip/bootrom.h
+++ b/arch/arm/include/asm/arch-rockchip/bootrom.h
@@ -11,6 +11,7 @@
  * Saved Stack pointer address.
  * Access might be needed in some special cases.
  */
+#include <asm/types.h>
 extern u32 SAVE_SP_ADDR;
 
 /**
diff --git a/arch/arm/include/asm/arch-rockchip/clock.h b/arch/arm/include/asm/arch-rockchip/clock.h
index 2b47b7a9d26..f05d88bc0a6 100644
--- a/arch/arm/include/asm/arch-rockchip/clock.h
+++ b/arch/arm/include/asm/arch-rockchip/clock.h
@@ -6,7 +6,9 @@
 #ifndef _ASM_ARCH_CLOCK_H
 #define _ASM_ARCH_CLOCK_H
 
+#include <compiler.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/arch/arm/include/asm/arch-rockchip/cpu_rk3288.h b/arch/arm/include/asm/arch-rockchip/cpu_rk3288.h
index 3536f444946..0180290cad4 100644
--- a/arch/arm/include/asm/arch-rockchip/cpu_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/cpu_rk3288.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define ROCKCHIP_CPU_MASK       0xffff0000
 #define ROCKCHIP_CPU_RK3288     0x32880000
diff --git a/arch/arm/include/asm/arch-rockchip/cru_px30.h b/arch/arm/include/asm/arch-rockchip/cru_px30.h
index c76d5751ef5..3c58db1d263 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_px30.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_CRU_PX30_H
 
 #include <linux/kernel.h>
+#include <linux/types.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 c580bf12034..ac62de5b9f1 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_CRU_RK3036_H
 
 #include <linux/kernel.h>
+#include <linux/types.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 e7dec3c7c9e..63c697b9839 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
@@ -7,6 +7,7 @@
 #define _ASM_ARCH_CRU_RK3128_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #endif
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3188.h b/arch/arm/include/asm/arch-rockchip/cru_rk3188.h
index 97268b8777e..62120dc2589 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3188.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3188.h
@@ -7,6 +7,7 @@
 
 #include <stdbool.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define OSC_HZ		(24 * 1000 * 1000)
 
 #define APLL_HZ		(1608 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
index ca4d727a6a7..706fca369b0 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_CRU_RK322X_H
 
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3288.h b/arch/arm/include/asm/arch-rockchip/cru_rk3288.h
index 7affb2f0644..82ba61abcbe 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3288.h
@@ -9,6 +9,7 @@
 #define _ASM_ARCH_CRU_RK3288_H
 
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define OSC_HZ		(24 * 1000 * 1000)
 
 #define APLL_HZ		(1800 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
index 2cd984ad009..5a95a0173c5 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_CRU_RK3328_H_
 
 #include <linux/kernel.h>
+#include <linux/types.h>
 struct rk3328_clk_priv {
 	struct rk3328_cru *cru;
 	ulong rate;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
index fdeb3735770..97e44815621 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_CRU_RK3399_H_
 
 /* Private data for the clock driver - used by rockchip_get_cru() */
+#include <asm/types.h>
 #include <linux/kernel.h>
 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 4499b453b68..3a69195ce51 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
@@ -9,6 +9,7 @@
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #endif
 
 #define OSC_HZ		(24 * 1000 * 1000)
diff --git a/arch/arm/include/asm/arch-rockchip/ddr_rk3188.h b/arch/arm/include/asm/arch-rockchip/ddr_rk3188.h
index c60655fcae0..be3d9d4d36b 100644
--- a/arch/arm/include/asm/arch-rockchip/ddr_rk3188.h
+++ b/arch/arm/include/asm/arch-rockchip/ddr_rk3188.h
@@ -7,6 +7,7 @@
 #define _ASM_ARCH_DDR_RK3188_H
 
 #include <asm/arch-rockchip/ddr_rk3288.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /*
diff --git a/arch/arm/include/asm/arch-rockchip/ddr_rk3288.h b/arch/arm/include/asm/arch-rockchip/ddr_rk3288.h
index ea3b6f48d90..312bdbc6de5 100644
--- a/arch/arm/include/asm/arch-rockchip/ddr_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/ddr_rk3288.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_DDR_RK3288_H
 #define _ASM_ARCH_DDR_RK3288_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3288_ddr_pctl {
 	u32 scfg;
diff --git a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
index a03d3318e02..7ee787c526b 100644
--- a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_DDR_RK3368_H__
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #endif
diff --git a/arch/arm/include/asm/arch-rockchip/edp_rk3288.h b/arch/arm/include/asm/arch-rockchip/edp_rk3288.h
index 97383fce190..d51094f1bfc 100644
--- a/arch/arm/include/asm/arch-rockchip/edp_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/edp_rk3288.h
@@ -7,6 +7,7 @@
 #ifndef _ASM_ARCH_EDP_H
 #define _ASM_ARCH_EDP_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3288_edp {
 	u8	res0[0x10];
diff --git a/arch/arm/include/asm/arch-rockchip/f_rockusb.h b/arch/arm/include/asm/arch-rockchip/f_rockusb.h
index 9772321023b..46bcbf7fce4 100644
--- a/arch/arm/include/asm/arch-rockchip/f_rockusb.h
+++ b/arch/arm/include/asm/arch-rockchip/f_rockusb.h
@@ -8,6 +8,7 @@
 #ifndef _F_ROCKUSB_H_
 #define _F_ROCKUSB_H_
 #include <blk.h>
+#include <linux/types.h>
 
 #define ROCKUSB_VERSION		"0.1"
 
diff --git a/arch/arm/include/asm/arch-rockchip/gpio.h b/arch/arm/include/asm/arch-rockchip/gpio.h
index 0ec09d40b4e..810b292329c 100644
--- a/arch/arm/include/asm/arch-rockchip/gpio.h
+++ b/arch/arm/include/asm/arch-rockchip/gpio.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_GPIO_H
 #define _ASM_ARCH_GPIO_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rockchip_gpio_regs {
 	u32 swport_dr;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3188.h b/arch/arm/include/asm/arch-rockchip/grf_rk3188.h
index 8e80749a76e..6899f652408 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3188.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3188.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_GRF_RK3188_H
 #define _ASM_ARCH_GRF_RK3188_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3188_grf_gpio_lh {
 	u32 l;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3288.h b/arch/arm/include/asm/arch-rockchip/grf_rk3288.h
index 894d3a40b09..f30e3c05dc0 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3288.h
@@ -7,6 +7,7 @@
 #ifndef _ASM_ARCH_GRF_RK3288_H
 #define _ASM_ARCH_GRF_RK3288_H
 
+#include <asm/types.h>
 struct rk3288_grf_gpio_lh {
 	u32 l;
 	u32 h;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3328.h b/arch/arm/include/asm/arch-rockchip/grf_rk3328.h
index 663a3fa52e3..312f6f4193c 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3328.h
@@ -6,6 +6,7 @@
 #ifndef __SOC_ROCKCHIP_RK3328_GRF_H__
 #define __SOC_ROCKCHIP_RK3328_GRF_H__
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3328_grf_regs {
 	u32 gpio0a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
index 8e4b3ec481c..62fd8792cfa 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
@@ -7,6 +7,7 @@
 #define _ASM_ARCH_GRF_RK3368_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #endif
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3399.h b/arch/arm/include/asm/arch-rockchip/grf_rk3399.h
index 0a7249560f2..7d7708576ed 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3399.h
@@ -6,6 +6,7 @@
 #ifndef __SOC_ROCKCHIP_RK3399_GRF_H__
 #define __SOC_ROCKCHIP_RK3399_GRF_H__
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3399_grf_regs {
 	u32 reserved[0x800];
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
index aefbe9b56e1..470e91c2970 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
@@ -5,6 +5,7 @@
 #ifndef _ASM_ARCH_GRF_RV1108_H
 #define _ASM_ARCH_GRF_RV1108_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rv1108_grf {
 	u32 reserved[4];
diff --git a/arch/arm/include/asm/arch-rockchip/i2c.h b/arch/arm/include/asm/arch-rockchip/i2c.h
index b0e1936f608..4da43237214 100644
--- a/arch/arm/include/asm/arch-rockchip/i2c.h
+++ b/arch/arm/include/asm/arch-rockchip/i2c.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_I2C_H
 #define __ASM_ARCH_I2C_H
 
+#include <asm/types.h>
 struct i2c_regs {
 	u32 con;
 	u32 clkdiv;
diff --git a/arch/arm/include/asm/arch-rockchip/misc.h b/arch/arm/include/asm/arch-rockchip/misc.h
index b6b03c934ed..8689e3dadac 100644
--- a/arch/arm/include/asm/arch-rockchip/misc.h
+++ b/arch/arm/include/asm/arch-rockchip/misc.h
@@ -6,6 +6,7 @@
  *      Rohan Garg <rohan.garg at collabora.com>
  */
 
+#include <asm/types.h>
 int rockchip_cpuid_from_efuse(const u32 cpuid_offset,
 			      const u32 cpuid_length,
 			      u8 *cpuid);
diff --git a/arch/arm/include/asm/arch-rockchip/pmu_rk3188.h b/arch/arm/include/asm/arch-rockchip/pmu_rk3188.h
index 6227dc0ed5a..24de34758fb 100644
--- a/arch/arm/include/asm/arch-rockchip/pmu_rk3188.h
+++ b/arch/arm/include/asm/arch-rockchip/pmu_rk3188.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_PMU_RK3188_H
 #define _ASM_ARCH_PMU_RK3188_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3188_pmu {
 	u32 wakeup_cfg[2];
diff --git a/arch/arm/include/asm/arch-rockchip/pmu_rk3288.h b/arch/arm/include/asm/arch-rockchip/pmu_rk3288.h
index 1b50cd5326e..7574eb975c3 100644
--- a/arch/arm/include/asm/arch-rockchip/pmu_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/pmu_rk3288.h
@@ -8,6 +8,7 @@
 #ifndef _ASM_ARCH_PMU_RK3288_H
 #define _ASM_ARCH_PMU_RK3288_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3288_pmu {
 	u32 wakeup_cfg[2];
diff --git a/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h b/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h
index 350559d5054..0408683765c 100644
--- a/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/pmu_rk3399.h
@@ -7,6 +7,7 @@
 #ifndef __SOC_ROCKCHIP_RK3399_PMU_H__
 #define __SOC_ROCKCHIP_RK3399_PMU_H__
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3399_pmu_regs {
 	u32 pmu_wakeup_cfg[5];
diff --git a/arch/arm/include/asm/arch-rockchip/sdram.h b/arch/arm/include/asm/arch-rockchip/sdram.h
index cf2a7b7d105..e02fea9f4fa 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_SDRAM_H
 #define _ASM_ARCH_SDRAM_H
 
+#include <linux/types.h>
 enum {
 	DDR4 = 0,
 	DDR3 = 0x3,
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h
index 5efa6e9445d..6d8c93092f3 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_common.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h
@@ -10,6 +10,7 @@
 #define MHZ		(1000 * 1000)
 #endif
 
+#include <asm/types.h>
 #define PATTERN		(0x5aa5f00f)
 
 #define MIN(a, b)	(((a) > (b)) ? (b) : (a))
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_msch.h b/arch/arm/include/asm/arch-rockchip/sdram_msch.h
index cfb3d9cc869..9ae4d271592 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_msch.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_msch.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_SDRAM_MSCH_H
 #define _ASM_ARCH_SDRAM_MSCH_H
 
+#include <asm/types.h>
 union noc_ddrtiminga0 {
 	u32 d32;
 	struct {
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 3a3657789f6..e48a6b87f73 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
@@ -8,6 +8,8 @@
 #include <asm/arch-rockchip/sdram_common.h>
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
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 a033a185388..548f076ef76 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
@@ -9,6 +9,8 @@
 #include <asm/arch-rockchip/sdram_phy_ron_rtt_px30.h>
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_px30.h b/arch/arm/include/asm/arch-rockchip/sdram_px30.h
index 2ab8e97ae1d..2a4353976f1 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_px30.h
@@ -10,6 +10,7 @@
 #include <asm/arch-rockchip/sdram_pctl_px30.h>
 #include <asm/arch-rockchip/sdram_phy_px30.h>
 #include <asm/arch-rockchip/sdram_phy_ron_rtt_px30.h>
+#include <asm/types.h>
 
 #define SR_IDLE				93
 #define PD_IDLE				13
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
index 7f89d7f9211..85a9f54e6d6 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_SDRAM_RK3036_H
 
 #include <linux/kernel.h>
+#include <linux/types.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 2aaf66c1ab0..60c68f751a5 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
@@ -6,6 +6,7 @@
 #define _ASM_ARCH_SDRAM_RK322X_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #endif
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
index 9dede806843..75a465c3c0d 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h
@@ -8,6 +8,7 @@
 #ifndef _ASM_ARCH_RK3288_SDRAM_H__
 #define _ASM_ARCH_RK3288_SDRAM_H__
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3288_sdram_channel {
 	/*
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3328.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3328.h
index 10923505d6e..cfb07c646af 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3328.h
@@ -10,6 +10,7 @@
 #include <asm/arch-rockchip/sdram_pctl_px30.h>
 #include <asm/arch-rockchip/sdram_phy_px30.h>
 #include <asm/arch-rockchip/sdram_phy_ron_rtt_px30.h>
+#include <asm/types.h>
 
 #define SR_IDLE		93
 #define PD_IDLE		13
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
index c76372ee826..6123cd2b9a5 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
@@ -8,6 +8,7 @@
 #include <asm/arch-rockchip/sdram_common.h>
 #include <asm/arch-rockchip/sdram_msch.h>
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-rockchip/timer.h b/arch/arm/include/asm/arch-rockchip/timer.h
index 77b54220447..befe0b66b40 100644
--- a/arch/arm/include/asm/arch-rockchip/timer.h
+++ b/arch/arm/include/asm/arch-rockchip/timer.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_ARCH_TIMER_H
 #define __ASM_ARCH_TIMER_H
 
+#include <asm/types.h>
 struct rk_timer {
 	u32 timer_load_count0;
 	u32 timer_load_count1;
diff --git a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
index c1aab4219e4..5e6fa4f32d7 100644
--- a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
@@ -7,6 +7,7 @@
 #ifndef _ASM_ARCH_VOP_RK3288_H
 #define _ASM_ARCH_VOP_RK3288_H
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 struct rk3288_vop {
 	u32 reg_cfg_done;
diff --git a/arch/arm/include/asm/arch-s32v234/lpddr2.h b/arch/arm/include/asm/arch-s32v234/lpddr2.h
index c5efee5b75d..6b215738ec2 100644
--- a/arch/arm/include/asm/arch-s32v234/lpddr2.h
+++ b/arch/arm/include/asm/arch-s32v234/lpddr2.h
@@ -7,6 +7,7 @@
 #define __ARCH_ARM_MACH_S32V234_LPDDR2_H__
 
 /* definitions for LPDDR2 PAD values */
+#include <linux/types.h>
 #define LPDDR2_CLK0_PAD	\
 	(SIUL2_MSCR_DDR_SEL_LPDDR2 | SIUL2_MSCR_DDR_INPUT_DIFF_DDR | SIUL2_MSCR_DDR_ODT_120ohm |\
 	 SIUL2_MSCR_DSE_48ohm | SIUL2_MSCR_PUS_100K_UP | SIUL2_MSCR_CRPOINT_TRIM_1 |			\
diff --git a/arch/arm/include/asm/arch-spear/gpio.h b/arch/arm/include/asm/arch-spear/gpio.h
index 4c8c40b1c99..69a1fd0d9e2 100644
--- a/arch/arm/include/asm/arch-spear/gpio.h
+++ b/arch/arm/include/asm/arch-spear/gpio.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_SPEAR_GPIO_H
 #define __ASM_ARCH_SPEAR_GPIO_H
 
+#include <asm/types.h>
 enum gpio_direction {
 	GPIO_DIRECTION_IN,
 	GPIO_DIRECTION_OUT,
diff --git a/arch/arm/include/asm/arch-spear/spr_defs.h b/arch/arm/include/asm/arch-spear/spr_defs.h
index d09e7eb63a4..1a37dd72efa 100644
--- a/arch/arm/include/asm/arch-spear/spr_defs.h
+++ b/arch/arm/include/asm/arch-spear/spr_defs.h
@@ -7,6 +7,7 @@
 #ifndef __SPR_DEFS_H__
 #define __SPR_DEFS_H__
 
+#include <linux/types.h>
 extern int spear_board_init(ulong);
 extern void setfreq(unsigned int, unsigned int);
 extern unsigned int setfreq_sz;
diff --git a/arch/arm/include/asm/arch-spear/spr_emi.h b/arch/arm/include/asm/arch-spear/spr_emi.h
index 7b1cf35d3ab..1667929de29 100644
--- a/arch/arm/include/asm/arch-spear/spr_emi.h
+++ b/arch/arm/include/asm/arch-spear/spr_emi.h
@@ -34,4 +34,5 @@ struct emi_regs {
 
 #endif
 
+#include <asm/types.h>
 #endif
diff --git a/arch/arm/include/asm/arch-spear/spr_gpt.h b/arch/arm/include/asm/arch-spear/spr_gpt.h
index dced0a17a62..cb63e314b57 100644
--- a/arch/arm/include/asm/arch-spear/spr_gpt.h
+++ b/arch/arm/include/asm/arch-spear/spr_gpt.h
@@ -7,6 +7,7 @@
 #ifndef _SPR_GPT_H
 #define _SPR_GPT_H
 
+#include <asm/types.h>
 struct gpt_regs {
 	u8 reserved[0x80];
 	u32 control;
diff --git a/arch/arm/include/asm/arch-spear/spr_misc.h b/arch/arm/include/asm/arch-spear/spr_misc.h
index 01711193519..a177d69c7fb 100644
--- a/arch/arm/include/asm/arch-spear/spr_misc.h
+++ b/arch/arm/include/asm/arch-spear/spr_misc.h
@@ -7,6 +7,7 @@
 #ifndef _SPR_MISC_H
 #define _SPR_MISC_H
 
+#include <linux/types.h>
 struct misc_regs {
 	u32 auto_cfg_reg;	/* 0x0 */
 	u32 armdbg_ctr_reg;	/* 0x4 */
diff --git a/arch/arm/include/asm/arch-spear/spr_ssp.h b/arch/arm/include/asm/arch-spear/spr_ssp.h
index 088d34b405e..48344f6b9f2 100644
--- a/arch/arm/include/asm/arch-spear/spr_ssp.h
+++ b/arch/arm/include/asm/arch-spear/spr_ssp.h
@@ -6,6 +6,7 @@
 #ifndef _SPR_SSP_H
 #define _SPR_SSP_H
 
+#include <asm/types.h>
 struct ssp_regs {
 	u32 sspcr0;
 	u32 sspcr1;
diff --git a/arch/arm/include/asm/arch-spear/spr_syscntl.h b/arch/arm/include/asm/arch-spear/spr_syscntl.h
index 6a83d87d134..d4b259e3fae 100644
--- a/arch/arm/include/asm/arch-spear/spr_syscntl.h
+++ b/arch/arm/include/asm/arch-spear/spr_syscntl.h
@@ -7,6 +7,7 @@
 #ifndef __SYSCTRL_H
 #define __SYSCTRL_H
 
+#include <asm/types.h>
 struct syscntl_regs {
 	u32 scctrl;
 	u32 scsysstat;
diff --git a/arch/arm/include/asm/arch-stm32/gpio.h b/arch/arm/include/asm/arch-stm32/gpio.h
index 570e80a6ba8..1b4f560ba70 100644
--- a/arch/arm/include/asm/arch-stm32/gpio.h
+++ b/arch/arm/include/asm/arch-stm32/gpio.h
@@ -7,6 +7,7 @@
 #ifndef _GPIO_H_
 #define _GPIO_H_
 
+#include <asm/types.h>
 #define STM32_GPIOS_PER_BANK		16
 
 enum stm32_gpio_port {
diff --git a/arch/arm/include/asm/arch-stm32f4/stm32.h b/arch/arm/include/asm/arch-stm32f4/stm32.h
index 2094bd73212..74ee7130fb8 100644
--- a/arch/arm/include/asm/arch-stm32f4/stm32.h
+++ b/arch/arm/include/asm/arch-stm32f4/stm32.h
@@ -11,6 +11,7 @@
 #define _MACH_STM32_H_
 
 #include <asm/arch-stm32/stm32f.h>
+#include <asm/types.h>
 
 /*
  * Peripheral memory map
diff --git a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
index 8af6de220d8..a199b4ec53e 100644
--- a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
@@ -8,6 +8,7 @@
 #define __STM32_PWR_H_
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-stm32f7/stm32.h b/arch/arm/include/asm/arch-stm32f7/stm32.h
index 3451e74a3d0..83893393f40 100644
--- a/arch/arm/include/asm/arch-stm32f7/stm32.h
+++ b/arch/arm/include/asm/arch-stm32f7/stm32.h
@@ -8,6 +8,7 @@
 #define _ASM_ARCH_HARDWARE_H
 
 #include <asm/arch-stm32/stm32f.h>
+#include <asm/types.h>
 
 static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
 	[0 ... 3] =	32 * 1024,
diff --git a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
index 02faaeb663c..fe244e7ed5c 100644
--- a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
@@ -8,6 +8,7 @@
 #define __STM32_PWR_H_
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-stm32f7/syscfg.h b/arch/arm/include/asm/arch-stm32f7/syscfg.h
index 985ae2544de..c1f7ebeb7b9 100644
--- a/arch/arm/include/asm/arch-stm32f7/syscfg.h
+++ b/arch/arm/include/asm/arch-stm32f7/syscfg.h
@@ -8,6 +8,7 @@
 #define _STM32_SYSCFG_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-stv0991/gpio.h b/arch/arm/include/asm/arch-stv0991/gpio.h
index b27f4078582..0dd9f8f0fdf 100644
--- a/arch/arm/include/asm/arch-stv0991/gpio.h
+++ b/arch/arm/include/asm/arch-stv0991/gpio.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_STV0991_GPIO_H
 #define __ASM_ARCH_STV0991_GPIO_H
 
+#include <asm/types.h>
 enum gpio_direction {
 	GPIO_DIRECTION_IN,
 	GPIO_DIRECTION_OUT,
diff --git a/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h b/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
index df9dd54e5a8..81c80dc2afb 100644
--- a/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
+++ b/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
@@ -7,6 +7,7 @@
 #ifndef _STV0991_CGU_H
 #define _STV0991_CGU_H
 
+#include <asm/types.h>
 struct stv0991_cgu_regs {
 	u32 cpu_freq;		/* offset 0x0 */
 	u32 icn2_freq;		/* offset 0x4 */
diff --git a/arch/arm/include/asm/arch-stv0991/stv0991_creg.h b/arch/arm/include/asm/arch-stv0991/stv0991_creg.h
index 4d444a6df16..ed6ebbfbff9 100644
--- a/arch/arm/include/asm/arch-stv0991/stv0991_creg.h
+++ b/arch/arm/include/asm/arch-stv0991/stv0991_creg.h
@@ -7,6 +7,7 @@
 #ifndef _STV0991_CREG_H
 #define _STV0991_CREG_H
 
+#include <asm/types.h>
 struct stv0991_creg {
 	u32 version;		/* offset 0x0 */
 	u32 hdpctl;		/* offset 0x4 */
diff --git a/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h b/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
index cd27472ad7e..0dbc88db1d8 100644
--- a/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
+++ b/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
@@ -8,6 +8,7 @@
 #define _STV0991_GPT_H
 
 #include <asm/arch-stv0991/hardware.h>
+#include <asm/types.h>
 
 struct gpt_regs {
 	u32 cr1;
diff --git a/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h b/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
index 8cb8a8a6137..b90fa1cd5a2 100644
--- a/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
+++ b/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
@@ -7,6 +7,7 @@
 #ifndef _STV0991_WD_RST_H
 #define _STV0991_WD_RST_H
 #include <asm/arch-stv0991/hardware.h>
+#include <asm/types.h>
 
 struct stv0991_wd_ru {
 	u32 wdru_config;
diff --git a/arch/arm/include/asm/arch-sunxi/ccu.h b/arch/arm/include/asm/arch-sunxi/ccu.h
index cac5c5faf05..161fbd0eabe 100644
--- a/arch/arm/include/asm/arch-sunxi/ccu.h
+++ b/arch/arm/include/asm/arch-sunxi/ccu.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 /**
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
index 2cec91cb20e..67d84f60bb6 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
@@ -352,6 +352,7 @@ struct sunxi_ccm_reg {
 #define CCM_DE_CTRL_GATE		(1 << 31)
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 void clock_set_pll1(unsigned int hz);
 void clock_set_pll3(unsigned int hz);
 unsigned int clock_get_pll3(void);
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 426069fc69a..1c4a8bc589f 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
@@ -10,6 +10,7 @@
 #define _SUNXI_CLOCK_SUN50I_H6_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
index 3c3ebfd3a20..cf2f5bfcee9 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
@@ -519,6 +519,7 @@ struct sunxi_ccm_reg {
 #define CCM_SEC_SWITCH_PLL_NONSEC	(1 << 0)
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 void clock_set_pll1(unsigned int hz);
 void clock_set_pll3(unsigned int hz);
 void clock_set_pll3_factors(int m, int n);
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h b/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h
index 14df3cc8f46..7c6f14f49cd 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h
@@ -297,6 +297,7 @@ struct sunxi_ccm_reg {
 
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 void clock_set_pll1(unsigned int hz);
 void clock_set_pll5(unsigned int clk);
 unsigned int clock_get_pll6(void);
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
index fe6b8ba2732..6b990940d6a 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
@@ -9,6 +9,7 @@
 #define _SUNXI_CLOCK_SUN9I_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/cpucfg.h b/arch/arm/include/asm/arch-sunxi/cpucfg.h
index 4aaebe0a976..a5911e77a7a 100644
--- a/arch/arm/include/asm/arch-sunxi/cpucfg.h
+++ b/arch/arm/include/asm/arch-sunxi/cpucfg.h
@@ -13,6 +13,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <compiler.h>
 struct __packed sunxi_cpucfg_cpu {
 	u32 rst;		/* base + 0x0 */
 	u32 ctrl;		/* base + 0x4 */
diff --git a/arch/arm/include/asm/arch-sunxi/display.h b/arch/arm/include/asm/arch-sunxi/display.h
index 525f9cb839d..87a9237cc7f 100644
--- a/arch/arm/include/asm/arch-sunxi/display.h
+++ b/arch/arm/include/asm/arch-sunxi/display.h
@@ -8,6 +8,7 @@
 #ifndef _SUNXI_DISPLAY_H
 #define _SUNXI_DISPLAY_H
 
+#include <asm/types.h>
 struct sunxi_de_fe_reg {
 	u32 enable;			/* 0x000 */
 	u32 frame_ctrl;			/* 0x004 */
diff --git a/arch/arm/include/asm/arch-sunxi/display2.h b/arch/arm/include/asm/arch-sunxi/display2.h
index 7202d2756cf..d7912aa8c7f 100644
--- a/arch/arm/include/asm/arch-sunxi/display2.h
+++ b/arch/arm/include/asm/arch-sunxi/display2.h
@@ -13,6 +13,7 @@
 #define _SUNXI_DISPLAY2_H
 
 /* internal clock settings */
+#include <asm/types.h>
 struct de_clk {
 	u32 gate_cfg;
 	u32 bus_cfg;
diff --git a/arch/arm/include/asm/arch-sunxi/dma_sun4i.h b/arch/arm/include/asm/arch-sunxi/dma_sun4i.h
index 309dc4f7cfd..bcf4ecf3c51 100644
--- a/arch/arm/include/asm/arch-sunxi/dma_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/dma_sun4i.h
@@ -6,6 +6,7 @@
 #ifndef _SUNXI_DMA_SUN4I_H
 #define _SUNXI_DMA_SUN4I_H
 
+#include <asm/types.h>
 struct sunxi_dma_cfg
 {
 	u32 ctl;		/* 0x00 Control */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun4i.h b/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
index 69c6600e981..8881a9721f1 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
@@ -11,6 +11,7 @@
 #ifndef _SUNXI_DRAM_SUN4I_H
 #define _SUNXI_DRAM_SUN4I_H
 
+#include <asm/types.h>
 struct sunxi_dram_reg {
 	u32 ccr;		/* 0x00 controller configuration register */
 	u32 dcr;		/* 0x04 dram configuration register */
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 ddaa238c279..a524ac72d27 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
@@ -11,6 +11,7 @@
 
 #include <stdbool.h>
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #endif
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
index b66d58cd73b..b5392faa689 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
@@ -14,6 +14,7 @@
 #define _SUNXI_DRAM_SUN6I_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a23.h b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a23.h
index ca98597f1f8..611f881467e 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a23.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a23.h
@@ -13,6 +13,7 @@
 #ifndef _SUNXI_DRAM_SUN8I_H
 #define _SUNXI_DRAM_SUN8I_H
 
+#include <asm/types.h>
 struct dram_para {
 	u32 clock;
 	u32 type;
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 3f65306cc68..d66d933db3b 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
@@ -12,6 +12,7 @@
 #define _SUNXI_DRAM_SUN8I_A33_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
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 2a879963547..afc128ce80f 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
@@ -12,6 +12,7 @@
 #define _SUNXI_DRAM_SUN8I_A83T_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
index 41df5fe5b6f..21f8f661371 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
@@ -12,6 +12,7 @@
 #define _SUNXI_DRAM_SUN9I_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h b/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h
index 3420f939f24..8fc2c12c6e4 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h
@@ -14,6 +14,7 @@
 
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct sunxi_mctl_com_reg {
 	u32 cr;			/* 0x00 control register */
diff --git a/arch/arm/include/asm/arch-sunxi/lcdc.h b/arch/arm/include/asm/arch-sunxi/lcdc.h
index 7fca301df96..a971de33205 100644
--- a/arch/arm/include/asm/arch-sunxi/lcdc.h
+++ b/arch/arm/include/asm/arch-sunxi/lcdc.h
@@ -11,6 +11,7 @@
 
 #include <fdtdec.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 struct sunxi_lcdc_reg {
 	u32 ctrl;			/* 0x00 */
diff --git a/arch/arm/include/asm/arch-sunxi/prcm.h b/arch/arm/include/asm/arch-sunxi/prcm.h
index 767d1ff98d7..43a7a532ea9 100644
--- a/arch/arm/include/asm/arch-sunxi/prcm.h
+++ b/arch/arm/include/asm/arch-sunxi/prcm.h
@@ -200,6 +200,7 @@
 #define PRCM_SEC_SWITCH_PWR_GATE_NONSEC (0x1 << 2)
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/compiler.h>
 
 struct sunxi_prcm_reg {
diff --git a/arch/arm/include/asm/arch-sunxi/pwm.h b/arch/arm/include/asm/arch-sunxi/pwm.h
index b89bddd2e89..15e8381b5ac 100644
--- a/arch/arm/include/asm/arch-sunxi/pwm.h
+++ b/arch/arm/include/asm/arch-sunxi/pwm.h
@@ -7,6 +7,7 @@
 #define _SUNXI_PWM_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-sunxi/rsb.h b/arch/arm/include/asm/arch-sunxi/rsb.h
index 8c64a995f25..1fab543dce4 100644
--- a/arch/arm/include/asm/arch-sunxi/rsb.h
+++ b/arch/arm/include/asm/arch-sunxi/rsb.h
@@ -12,6 +12,7 @@
 #define __SUNXI_RSB_H
 
 #include <asm/io.h>
+#include <asm/types.h>
 
 struct sunxi_rsb_reg {
 	u32 ctrl;	/* 0x00 */
diff --git a/arch/arm/include/asm/arch-sunxi/spl.h b/arch/arm/include/asm/arch-sunxi/spl.h
index 8c916e8c752..de1a9c21d3f 100644
--- a/arch/arm/include/asm/arch-sunxi/spl.h
+++ b/arch/arm/include/asm/arch-sunxi/spl.h
@@ -7,6 +7,7 @@
 #ifndef	_ASM_ARCH_SPL_H_
 #define	_ASM_ARCH_SPL_H_
 
+#include <linux/types.h>
 #define BOOT0_MAGIC		"eGON.BT0"
 #define SPL_SIGNATURE		"SPL" /* marks "sunxi" SPL header */
 #define SPL_MAJOR_BITS		3
diff --git a/arch/arm/include/asm/arch-sunxi/tve.h b/arch/arm/include/asm/arch-sunxi/tve.h
index 46cd87e79e8..109e46bf455 100644
--- a/arch/arm/include/asm/arch-sunxi/tve.h
+++ b/arch/arm/include/asm/arch-sunxi/tve.h
@@ -9,6 +9,7 @@
 #ifndef _TVE_H
 #define _TVE_H
 
+#include <asm/types.h>
 enum tve_mode {
 	tve_mode_vga,
 	tve_mode_composite_pal,
diff --git a/arch/arm/include/asm/arch-sunxi/tzpc.h b/arch/arm/include/asm/arch-sunxi/tzpc.h
index 7a6fcaebdb5..6a94083ae03 100644
--- a/arch/arm/include/asm/arch-sunxi/tzpc.h
+++ b/arch/arm/include/asm/arch-sunxi/tzpc.h
@@ -7,6 +7,7 @@
 #define _SUNXI_TZPC_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct sunxi_tzpc {
 	u32 r0size;		/* 0x00 Size of secure RAM region */
 	u32 decport0_status;	/* 0x04 Status of decode protection port 0 */
diff --git a/arch/arm/include/asm/arch-sunxi/watchdog.h b/arch/arm/include/asm/arch-sunxi/watchdog.h
index 38e2ef2aca3..c30bb276ae9 100644
--- a/arch/arm/include/asm/arch-sunxi/watchdog.h
+++ b/arch/arm/include/asm/arch-sunxi/watchdog.h
@@ -9,6 +9,7 @@
 #ifndef _SUNXI_WATCHDOG_H_
 #define _SUNXI_WATCHDOG_H_
 
+#include <asm/types.h>
 #define WDT_CTRL_RESTART	(0x1 << 0)
 #define WDT_CTRL_KEY		(0x0a57 << 1)
 
diff --git a/arch/arm/include/asm/arch-tegra/apb_misc.h b/arch/arm/include/asm/arch-tegra/apb_misc.h
index d438966afbe..af98f984c9f 100644
--- a/arch/arm/include/asm/arch-tegra/apb_misc.h
+++ b/arch/arm/include/asm/arch-tegra/apb_misc.h
@@ -7,6 +7,7 @@
 #define _GP_PADCTRL_H_
 
 /* APB_MISC_PP registers */
+#include <asm/types.h>
 struct apb_misc_pp_ctlr {
 	u32	reserved0[2];
 	u32	strapping_opt_a;/* 0x08: APB_MISC_PP_STRAPPING_OPT_A */
diff --git a/arch/arm/include/asm/arch-tegra/bpmp_abi.h b/arch/arm/include/asm/arch-tegra/bpmp_abi.h
index 373da526ed6..599982a5f02 100644
--- a/arch/arm/include/asm/arch-tegra/bpmp_abi.h
+++ b/arch/arm/include/asm/arch-tegra/bpmp_abi.h
@@ -73,6 +73,7 @@
  *
  * @todo document the flags
  */
+#include <linux/types.h>
 struct mrq_request {
 	/** @brief MRQ number of the request */
 	uint32_t mrq;
diff --git a/arch/arm/include/asm/arch-tegra/cboot.h b/arch/arm/include/asm/arch-tegra/cboot.h
index d89e784f2d2..03ba29859bd 100644
--- a/arch/arm/include/asm/arch-tegra/cboot.h
+++ b/arch/arm/include/asm/arch-tegra/cboot.h
@@ -8,6 +8,7 @@
 
 #include <net.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_ARM64
 
diff --git a/arch/arm/include/asm/arch-tegra/clk_rst.h b/arch/arm/include/asm/arch-tegra/clk_rst.h
index 2359e142fb7..7771dc5cbee 100644
--- a/arch/arm/include/asm/arch-tegra/clk_rst.h
+++ b/arch/arm/include/asm/arch-tegra/clk_rst.h
@@ -8,6 +8,7 @@
 #define _TEGRA_CLK_RST_H_
 
 /* PLL registers - there are several PLLs in the clock controller */
+#include <linux/types.h>
 struct clk_pll {
 	uint pll_base;		/* the control register */
 	/* pll_out[0] is output A control, pll_out[1] is output B control */
diff --git a/arch/arm/include/asm/arch-tegra/clock.h b/arch/arm/include/asm/arch-tegra/clock.h
index 630287c1b78..cd35095cb10 100644
--- a/arch/arm/include/asm/arch-tegra/clock.h
+++ b/arch/arm/include/asm/arch-tegra/clock.h
@@ -8,6 +8,7 @@
 #ifndef _TEGRA_CLOCK_H_
 #define _TEGRA_CLOCK_H_
 
+#include <linux/types.h>
 struct udevice;
 
 /* Set of oscillator frequencies supported in the internal API. */
diff --git a/arch/arm/include/asm/arch-tegra/dc.h b/arch/arm/include/asm/arch-tegra/dc.h
index 6444af2993a..d8a079e3221 100644
--- a/arch/arm/include/asm/arch-tegra/dc.h
+++ b/arch/arm/include/asm/arch-tegra/dc.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 /* Register definitions for the Tegra display controller */
diff --git a/arch/arm/include/asm/arch-tegra/fuse.h b/arch/arm/include/asm/arch-tegra/fuse.h
index 5b8e0bd8d16..e2412d0676f 100644
--- a/arch/arm/include/asm/arch-tegra/fuse.h
+++ b/arch/arm/include/asm/arch-tegra/fuse.h
@@ -8,6 +8,7 @@
 #define _FUSE_H_
 
 /* FUSE registers */
+#include <asm/types.h>
 struct fuse_regs {
 	u32 reserved0[64];		/* 0x00 - 0xFC: */
 	u32 production_mode;		/* 0x100: FUSE_PRODUCTION_MODE */
diff --git a/arch/arm/include/asm/arch-tegra/gpio.h b/arch/arm/include/asm/arch-tegra/gpio.h
index fe7b3a50e0d..15384670c95 100644
--- a/arch/arm/include/asm/arch-tegra/gpio.h
+++ b/arch/arm/include/asm/arch-tegra/gpio.h
@@ -6,6 +6,7 @@
 #ifndef _TEGRA_GPIO_H_
 #define _TEGRA_GPIO_H_
 
+#include <asm/types.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 
 #define TEGRA_GPIOS_PER_PORT	8
diff --git a/arch/arm/include/asm/arch-tegra/ivc.h b/arch/arm/include/asm/arch-tegra/ivc.h
index 52c10b8fab3..4f0e6a1300a 100644
--- a/arch/arm/include/asm/arch-tegra/ivc.h
+++ b/arch/arm/include/asm/arch-tegra/ivc.h
@@ -28,6 +28,7 @@
  */
 
 /**
+#include <linux/types.h>
  * struct tegra_ivc - In-memory shared memory layout.
  *
  * This is described in detail in ivc.c.
diff --git a/arch/arm/include/asm/arch-tegra/pmc.h b/arch/arm/include/asm/arch-tegra/pmc.h
index e1f5a738135..e4ab21552a8 100644
--- a/arch/arm/include/asm/arch-tegra/pmc.h
+++ b/arch/arm/include/asm/arch-tegra/pmc.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 /* Power Management Controller (APBDEV_PMC_) registers */
diff --git a/arch/arm/include/asm/arch-tegra/pwm.h b/arch/arm/include/asm/arch-tegra/pwm.h
index eebd104de9d..77de1478293 100644
--- a/arch/arm/include/asm/arch-tegra/pwm.h
+++ b/arch/arm/include/asm/arch-tegra/pwm.h
@@ -9,6 +9,7 @@
 #define __ASM_ARCH_TEGRA_PWM_H
 
 /* This is a single PWM channel */
+#include <linux/types.h>
 struct pwm_ctlr {
 	uint control;		/* Control register */
 	uint reserved[3];	/* Space space */
diff --git a/arch/arm/include/asm/arch-tegra/scu.h b/arch/arm/include/asm/arch-tegra/scu.h
index afe076419cf..942f644cc3b 100644
--- a/arch/arm/include/asm/arch-tegra/scu.h
+++ b/arch/arm/include/asm/arch-tegra/scu.h
@@ -8,6 +8,7 @@
 #define _SCU_H_
 
 /* ARM Snoop Control Unit (SCU) registers */
+#include <linux/types.h>
 struct scu_ctlr {
 	uint scu_ctrl;		/* SCU Control Register, offset 00 */
 	uint scu_cfg;		/* SCU Config Register, offset 04 */
diff --git a/arch/arm/include/asm/arch-tegra/tegra_ahub.h b/arch/arm/include/asm/arch-tegra/tegra_ahub.h
index 96d542a91ca..36de87033e7 100644
--- a/arch/arm/include/asm/arch-tegra/tegra_ahub.h
+++ b/arch/arm/include/asm/arch-tegra/tegra_ahub.h
@@ -14,6 +14,7 @@
  * Each TX CIF transmits data into the XBAR. Each RX CIF can receive audio
  * transmitted by a particular TX CIF.
  */
+#include <asm/types.h>
 struct xbar_regs {
 	u32 apbif_rx0;		/* AUDIO_APBIF_RX0, offset 0x00 */
 	u32 apbif_rx1;		/* AUDIO_APBIF_RX1, offset 0x04 */
diff --git a/arch/arm/include/asm/arch-tegra/tegra_i2s.h b/arch/arm/include/asm/arch-tegra/tegra_i2s.h
index 9319383f7c1..55bd31acc7e 100644
--- a/arch/arm/include/asm/arch-tegra/tegra_i2s.h
+++ b/arch/arm/include/asm/arch-tegra/tegra_i2s.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
  * tegra_i2s.h - Definitions for Tegra124 I2S driver.
+#include <asm/types.h>
  * Note, some structures (ex, CIF) are different in Tegra114.
  *
  * NVIDIA Tegra I2S controller
diff --git a/arch/arm/include/asm/arch-tegra/uart.h b/arch/arm/include/asm/arch-tegra/uart.h
index 24f0bdd51b8..01404dd12fd 100644
--- a/arch/arm/include/asm/arch-tegra/uart.h
+++ b/arch/arm/include/asm/arch-tegra/uart.h
@@ -8,6 +8,7 @@
 #define _UART_H_
 
 /* UART registers */
+#include <linux/types.h>
 struct uart_ctlr {
 	uint uart_thr_dlab_0;		/* UART_THR_DLAB_0_0, offset 00 */
 	uint uart_ier_dlab_0;		/* UART_IER_DLAB_0_0, offset 04 */
diff --git a/arch/arm/include/asm/arch-tegra/usb.h b/arch/arm/include/asm/arch-tegra/usb.h
index 6e6ea1443cb..9fc96dc251b 100644
--- a/arch/arm/include/asm/arch-tegra/usb.h
+++ b/arch/arm/include/asm/arch-tegra/usb.h
@@ -8,6 +8,7 @@
 #define _TEGRA_USB_H_
 
 /* USB Controller (USBx_CONTROLLER_) regs */
+#include <linux/types.h>
 struct usb_ctlr {
 	/* 0x000 */
 	uint id;
diff --git a/arch/arm/include/asm/arch-tegra/warmboot.h b/arch/arm/include/asm/arch-tegra/warmboot.h
index 3f02073ee49..0c2f0a56c25 100644
--- a/arch/arm/include/asm/arch-tegra/warmboot.h
+++ b/arch/arm/include/asm/arch-tegra/warmboot.h
@@ -7,6 +7,7 @@
 #ifndef _WARM_BOOT_H_
 #define _WARM_BOOT_H_
 
+#include <asm/types.h>
 #define STRAP_OPT_A_RAM_CODE_SHIFT	4
 #define STRAP_OPT_A_RAM_CODE_MASK	(0xf << STRAP_OPT_A_RAM_CODE_SHIFT)
 
diff --git a/arch/arm/include/asm/arch-tegra114/flow.h b/arch/arm/include/asm/arch-tegra114/flow.h
index 4f0fc3b7fb3..4c5fcfbb4d3 100644
--- a/arch/arm/include/asm/arch-tegra114/flow.h
+++ b/arch/arm/include/asm/arch-tegra114/flow.h
@@ -6,6 +6,7 @@
 #ifndef _TEGRA114_FLOW_H_
 #define _TEGRA114_FLOW_H_
 
+#include <asm/types.h>
 struct flow_ctlr {
 	u32 halt_cpu_events;
 	u32 halt_cop_events;
diff --git a/arch/arm/include/asm/arch-tegra114/gp_padctrl.h b/arch/arm/include/asm/arch-tegra114/gp_padctrl.h
index 69b35a1411e..9a09456dc58 100644
--- a/arch/arm/include/asm/arch-tegra114/gp_padctrl.h
+++ b/arch/arm/include/asm/arch-tegra114/gp_padctrl.h
@@ -7,6 +7,7 @@
 #define _TEGRA114_GP_PADCTRL_H_
 
 #include <asm/arch-tegra/gp_padctrl.h>
+#include <asm/types.h>
 
 /* APB_MISC_GP and padctrl registers */
 struct apb_misc_gp_ctlr {
diff --git a/arch/arm/include/asm/arch-tegra114/mc.h b/arch/arm/include/asm/arch-tegra114/mc.h
index 3930bab571f..7d60efe4383 100644
--- a/arch/arm/include/asm/arch-tegra114/mc.h
+++ b/arch/arm/include/asm/arch-tegra114/mc.h
@@ -10,6 +10,7 @@
 /**
  * Defines the memory controller registers we need/care about
  */
+#include <asm/types.h>
 struct mc_ctlr {
 	u32 reserved0[4];			/* offset 0x00 - 0x0C */
 	u32 mc_smmu_config;			/* offset 0x10 */
diff --git a/arch/arm/include/asm/arch-tegra114/sysctr.h b/arch/arm/include/asm/arch-tegra114/sysctr.h
index 228f423bed0..67731bbc05f 100644
--- a/arch/arm/include/asm/arch-tegra114/sysctr.h
+++ b/arch/arm/include/asm/arch-tegra114/sysctr.h
@@ -6,6 +6,7 @@
 #ifndef _TEGRA114_SYSCTR_H_
 #define _TEGRA114_SYSCTR_H_
 
+#include <asm/types.h>
 struct sysctr_ctlr {
 	u32 cntcr;		/* 0x00: SYSCTR0_CNTCR Counter Control */
 	u32 cntsr;		/* 0x04: SYSCTR0_CNTSR Counter Status */
diff --git a/arch/arm/include/asm/arch-tegra124/ahb.h b/arch/arm/include/asm/arch-tegra124/ahb.h
index d88cdfecea4..5180925d6fd 100644
--- a/arch/arm/include/asm/arch-tegra124/ahb.h
+++ b/arch/arm/include/asm/arch-tegra124/ahb.h
@@ -7,6 +7,7 @@
 #ifndef _TEGRA124_AHB_H_
 #define _TEGRA124_AHB_H_
 
+#include <asm/types.h>
 struct ahb_ctlr {
 	u32 reserved0;			/* 00h */
 	u32 arbitration_disable;	/* _ARBITRATION_DISABLE_0,	04h */
diff --git a/arch/arm/include/asm/arch-tegra124/clock.h b/arch/arm/include/asm/arch-tegra124/clock.h
index 3f54d362777..7c24026cce4 100644
--- a/arch/arm/include/asm/arch-tegra124/clock.h
+++ b/arch/arm/include/asm/arch-tegra124/clock.h
@@ -10,6 +10,7 @@
 #define _TEGRA124_CLOCK_H_
 
 #include <asm/arch-tegra/clock.h>
+#include <asm/types.h>
 
 /* CLK_RST_CONTROLLER_OSC_CTRL_0 */
 #define OSC_FREQ_SHIFT          28
diff --git a/arch/arm/include/asm/arch-tegra124/flow.h b/arch/arm/include/asm/arch-tegra124/flow.h
index ebcb22f1cb9..8b060acd756 100644
--- a/arch/arm/include/asm/arch-tegra124/flow.h
+++ b/arch/arm/include/asm/arch-tegra124/flow.h
@@ -8,6 +8,7 @@
 #define _TEGRA124_FLOW_H_
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/include/asm/arch-tegra124/gp_padctrl.h b/arch/arm/include/asm/arch-tegra124/gp_padctrl.h
index 750a2dc649a..85628af19f7 100644
--- a/arch/arm/include/asm/arch-tegra124/gp_padctrl.h
+++ b/arch/arm/include/asm/arch-tegra124/gp_padctrl.h
@@ -8,6 +8,7 @@
 #define _TEGRA124_GP_PADCTRL_H_
 
 #include <asm/arch-tegra/gp_padctrl.h>
+#include <asm/types.h>
 
 /* APB_MISC_GP and padctrl registers */
 struct apb_misc_gp_ctlr {
diff --git a/arch/arm/include/asm/arch-tegra124/gpio.h b/arch/arm/include/asm/arch-tegra124/gpio.h
index e5ea2815afa..2ec69bb57eb 100644
--- a/arch/arm/include/asm/arch-tegra124/gpio.h
+++ b/arch/arm/include/asm/arch-tegra124/gpio.h
@@ -15,6 +15,7 @@
 #define TEGRA_GPIO_BANKS	8	/* number of banks */
 
 #include <asm/arch-tegra/gpio.h>
+#include <linux/types.h>
 
 /* GPIO Controller registers for a single bank */
 struct gpio_ctlr_bank {
diff --git a/arch/arm/include/asm/arch-tegra124/mc.h b/arch/arm/include/asm/arch-tegra124/mc.h
index 617e55af20e..26b44574f66 100644
--- a/arch/arm/include/asm/arch-tegra124/mc.h
+++ b/arch/arm/include/asm/arch-tegra124/mc.h
@@ -9,6 +9,7 @@
 /**
  * Defines the memory controller registers we need/care about
  */
+#include <asm/types.h>
 struct mc_ctlr {
 	u32 reserved0[4];			/* offset 0x00 - 0x0C */
 	u32 mc_smmu_config;			/* offset 0x10 */
diff --git a/arch/arm/include/asm/arch-tegra124/sysctr.h b/arch/arm/include/asm/arch-tegra124/sysctr.h
index 6567104d083..f5b3ab565ff 100644
--- a/arch/arm/include/asm/arch-tegra124/sysctr.h
+++ b/arch/arm/include/asm/arch-tegra124/sysctr.h
@@ -7,6 +7,7 @@
 #ifndef _TEGRA124_SYSCTR_H_
 #define _TEGRA124_SYSCTR_H_
 
+#include <asm/types.h>
 struct sysctr_ctlr {
 	u32 cntcr;		/* 0x00: SYSCTR0_CNTCR Counter Control */
 	u32 cntsr;		/* 0x04: SYSCTR0_CNTSR Counter Status */
diff --git a/arch/arm/include/asm/arch-tegra20/display.h b/arch/arm/include/asm/arch-tegra20/display.h
index e7b3cffd466..26b0fa9d766 100644
--- a/arch/arm/include/asm/arch-tegra20/display.h
+++ b/arch/arm/include/asm/arch-tegra20/display.h
@@ -8,6 +8,7 @@
 #define __ASM_ARCH_TEGRA_DISPLAY_H
 
 #include <asm/arch-tegra/dc.h>
+#include <asm/types.h>
 
 /* This holds information about a window which can be displayed */
 struct disp_ctl_win {
diff --git a/arch/arm/include/asm/arch-tegra20/flow.h b/arch/arm/include/asm/arch-tegra20/flow.h
index 33be841ddbd..3bf0d0d1aa2 100644
--- a/arch/arm/include/asm/arch-tegra20/flow.h
+++ b/arch/arm/include/asm/arch-tegra20/flow.h
@@ -7,6 +7,7 @@
 #ifndef _FLOW_H_
 #define _FLOW_H_
 
+#include <asm/types.h>
 struct flow_ctlr {
 	u32	halt_cpu_events;
 	u32	halt_cop_events;
diff --git a/arch/arm/include/asm/arch-tegra20/gp_padctrl.h b/arch/arm/include/asm/arch-tegra20/gp_padctrl.h
index dd2ee126550..ab06bfb4cba 100644
--- a/arch/arm/include/asm/arch-tegra20/gp_padctrl.h
+++ b/arch/arm/include/asm/arch-tegra20/gp_padctrl.h
@@ -8,6 +8,7 @@
 #define _TEGRA20_GP_PADCTRL_H_
 
 #include <asm/arch-tegra/gp_padctrl.h>
+#include <asm/types.h>
 
 /* APB_MISC_GP and padctrl registers */
 struct apb_misc_gp_ctlr {
diff --git a/arch/arm/include/asm/arch-tegra20/gpio.h b/arch/arm/include/asm/arch-tegra20/gpio.h
index 6818c28723b..fb203d21468 100644
--- a/arch/arm/include/asm/arch-tegra20/gpio.h
+++ b/arch/arm/include/asm/arch-tegra20/gpio.h
@@ -15,6 +15,7 @@
 #define TEGRA_GPIO_BANKS	7	/* number of banks */
 
 #include <asm/arch-tegra/gpio.h>
+#include <linux/types.h>
 
 /* GPIO Controller registers for a single bank */
 struct gpio_ctlr_bank {
diff --git a/arch/arm/include/asm/arch-tegra20/mc.h b/arch/arm/include/asm/arch-tegra20/mc.h
index 71283e4e21e..67c5742e082 100644
--- a/arch/arm/include/asm/arch-tegra20/mc.h
+++ b/arch/arm/include/asm/arch-tegra20/mc.h
@@ -10,6 +10,7 @@
 /**
  * Defines the memory controller registers we need/care about
  */
+#include <asm/types.h>
 struct mc_ctlr {
 	u32 reserved0[3];			/* offset 0x00 - 0x08 */
 	u32 mc_emem_cfg;			/* offset 0x0C */
diff --git a/arch/arm/include/asm/arch-tegra20/sdram_param.h b/arch/arm/include/asm/arch-tegra20/sdram_param.h
index 3d1405fa3ba..75c1182a869 100644
--- a/arch/arm/include/asm/arch-tegra20/sdram_param.h
+++ b/arch/arm/include/asm/arch-tegra20/sdram_param.h
@@ -11,6 +11,7 @@
  * Defines the number of 32-bit words provided in each set of SDRAM parameters
  * for arbitration configuration data.
  */
+#include <asm/types.h>
 #define BCT_SDRAM_ARB_CONFIG_WORDS 27
 
 enum memory_type {
diff --git a/arch/arm/include/asm/arch-tegra210/ahb.h b/arch/arm/include/asm/arch-tegra210/ahb.h
index 8ecd6d9bae2..7b4a8994d8b 100644
--- a/arch/arm/include/asm/arch-tegra210/ahb.h
+++ b/arch/arm/include/asm/arch-tegra210/ahb.h
@@ -7,6 +7,7 @@
 #ifndef _TEGRA210_AHB_H_
 #define _TEGRA210_AHB_H_
 
+#include <asm/types.h>
 struct ahb_ctlr {
 	u32 reserved0;			/* 00h */
 	u32 arbitration_disable;	/* _ARBITRATION_DISABLE_0,	04h */
diff --git a/arch/arm/include/asm/arch-tegra210/flow.h b/arch/arm/include/asm/arch-tegra210/flow.h
index ef0be19e587..73ee94ef738 100644
--- a/arch/arm/include/asm/arch-tegra210/flow.h
+++ b/arch/arm/include/asm/arch-tegra210/flow.h
@@ -7,6 +7,7 @@
 #ifndef _TEGRA210_FLOW_H_
 #define _TEGRA210_FLOW_H_
 
+#include <asm/types.h>
 struct flow_ctlr {
 	u32 halt_cpu_events;	/* offset 0x00 */
 	u32 halt_cop_events;	/* offset 0x04 */
diff --git a/arch/arm/include/asm/arch-tegra210/gp_padctrl.h b/arch/arm/include/asm/arch-tegra210/gp_padctrl.h
index e9ff9037526..92a315f34fd 100644
--- a/arch/arm/include/asm/arch-tegra210/gp_padctrl.h
+++ b/arch/arm/include/asm/arch-tegra210/gp_padctrl.h
@@ -8,6 +8,7 @@
 #define _TEGRA210_GP_PADCTRL_H_
 
 #include <asm/arch-tegra/gp_padctrl.h>
+#include <asm/types.h>
 
 /* APB_MISC_GP and padctrl registers */
 struct apb_misc_gp_ctlr {
diff --git a/arch/arm/include/asm/arch-tegra210/gpio.h b/arch/arm/include/asm/arch-tegra210/gpio.h
index cb91b10bed8..9a3b5be72ee 100644
--- a/arch/arm/include/asm/arch-tegra210/gpio.h
+++ b/arch/arm/include/asm/arch-tegra210/gpio.h
@@ -15,6 +15,7 @@
 #define TEGRA_GPIO_BANKS	8	/* number of banks */
 
 #include <asm/arch-tegra/gpio.h>
+#include <linux/types.h>
 
 /* GPIO Controller registers for a single bank */
 struct gpio_ctlr_bank {
diff --git a/arch/arm/include/asm/arch-tegra210/mc.h b/arch/arm/include/asm/arch-tegra210/mc.h
index 5a2a5681d7a..a80e36c011f 100644
--- a/arch/arm/include/asm/arch-tegra210/mc.h
+++ b/arch/arm/include/asm/arch-tegra210/mc.h
@@ -9,6 +9,7 @@
 /**
  * Defines the memory controller registers we need/care about
  */
+#include <asm/types.h>
 struct mc_ctlr {
 	u32 reserved0[4];			/* offset 0x00 - 0x0C */
 	u32 mc_smmu_config;			/* offset 0x10 */
diff --git a/arch/arm/include/asm/arch-tegra210/sysctr.h b/arch/arm/include/asm/arch-tegra210/sysctr.h
index cb1c4997fac..8ada6e5c60c 100644
--- a/arch/arm/include/asm/arch-tegra210/sysctr.h
+++ b/arch/arm/include/asm/arch-tegra210/sysctr.h
@@ -7,6 +7,7 @@
 #ifndef _TEGRA210_SYSCTR_H_
 #define _TEGRA210_SYSCTR_H_
 
+#include <asm/types.h>
 struct sysctr_ctlr {
 	u32 cntcr;		/* 0x00: SYSCTR0_CNTCR Counter Control */
 	u32 cntsr;		/* 0x04: SYSCTR0_CNTSR Counter Status */
diff --git a/arch/arm/include/asm/arch-tegra30/flow.h b/arch/arm/include/asm/arch-tegra30/flow.h
index f3e947e9eee..3924b418040 100644
--- a/arch/arm/include/asm/arch-tegra30/flow.h
+++ b/arch/arm/include/asm/arch-tegra30/flow.h
@@ -6,6 +6,7 @@
 #ifndef _TEGRA30_FLOW_H_
 #define _TEGRA30_FLOW_H_
 
+#include <asm/types.h>
 struct flow_ctlr {
 	u32 halt_cpu_events;
 	u32 halt_cop_events;
diff --git a/arch/arm/include/asm/arch-tegra30/gp_padctrl.h b/arch/arm/include/asm/arch-tegra30/gp_padctrl.h
index 4ff785de8ea..65e811ababa 100644
--- a/arch/arm/include/asm/arch-tegra30/gp_padctrl.h
+++ b/arch/arm/include/asm/arch-tegra30/gp_padctrl.h
@@ -7,6 +7,7 @@
 #define _TEGRA30_GP_PADCTRL_H_
 
 #include <asm/arch-tegra/gp_padctrl.h>
+#include <asm/types.h>
 
 /* APB_MISC_GP and padctrl registers */
 struct apb_misc_gp_ctlr {
diff --git a/arch/arm/include/asm/arch-tegra30/gpio.h b/arch/arm/include/asm/arch-tegra30/gpio.h
index 1dd2e426ba6..5289e33fd92 100644
--- a/arch/arm/include/asm/arch-tegra30/gpio.h
+++ b/arch/arm/include/asm/arch-tegra30/gpio.h
@@ -14,6 +14,7 @@
 #define TEGRA_GPIO_BANKS	8	/* number of banks */
 
 #include <asm/arch-tegra/gpio.h>
+#include <linux/types.h>
 
 /* GPIO Controller registers for a single bank */
 struct gpio_ctlr_bank {
diff --git a/arch/arm/include/asm/arch-tegra30/mc.h b/arch/arm/include/asm/arch-tegra30/mc.h
index bbb0fe77bc4..9643ed81f90 100644
--- a/arch/arm/include/asm/arch-tegra30/mc.h
+++ b/arch/arm/include/asm/arch-tegra30/mc.h
@@ -10,6 +10,7 @@
 /**
  * Defines the memory controller registers we need/care about
  */
+#include <asm/types.h>
 struct mc_ctlr {
 	u32 reserved0[4];			/* offset 0x00 - 0x0C */
 	u32 mc_smmu_config;			/* offset 0x10 */
diff --git a/arch/arm/include/asm/arch-vf610/clock.h b/arch/arm/include/asm/arch-vf610/clock.h
index ec9786ce4fe..6cdad57e78f 100644
--- a/arch/arm/include/asm/arch-vf610/clock.h
+++ b/arch/arm/include/asm/arch-vf610/clock.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
+#include <asm/types.h>
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h b/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h
index 03e3cecb95a..8adfbefd0c8 100644
--- a/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h
+++ b/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h
@@ -11,6 +11,7 @@
 #define __ASM_ARCH_VF610_DDRMC_H
 
 #include <asm/arch/iomux-vf610.h>
+#include <asm/types.h>
 
 struct ddr3_jedec_timings {
 	u8 tinit;
diff --git a/arch/arm/include/asm/arch-vf610/gpio.h b/arch/arm/include/asm/arch-vf610/gpio.h
index 9bfdf168730..07ae0e4f64f 100644
--- a/arch/arm/include/asm/arch-vf610/gpio.h
+++ b/arch/arm/include/asm/arch-vf610/gpio.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_VF610_GPIO_H
 #define __ASM_ARCH_VF610_GPIO_H
 
+#include <asm/types.h>
 #define VYBRID_GPIO_COUNT		32
 #define VF610_GPIO_DIRECTION_IN	0x0
 #define VF610_GPIO_DIRECTION_OUT	0x1
diff --git a/arch/arm/include/asm/armv7_mpu.h b/arch/arm/include/asm/armv7_mpu.h
index 16b9d0d1aeb..bbad00406cd 100644
--- a/arch/arm/include/asm/armv7_mpu.h
+++ b/arch/arm/include/asm/armv7_mpu.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 #ifdef CONFIG_CPU_V7M
diff --git a/arch/arm/include/asm/armv7m.h b/arch/arm/include/asm/armv7m.h
index ad67b4fa34e..c8411475eb2 100644
--- a/arch/arm/include/asm/armv7m.h
+++ b/arch/arm/include/asm/armv7m.h
@@ -23,6 +23,7 @@
 #define V7M_SCB_VTOR		0x08
 
 #if !defined(__ASSEMBLY__)
+#include <linux/types.h>
 struct v7m_scb {
 	uint32_t cpuid;		/* CPUID Base Register */
 	uint32_t icsr;		/* Interrupt Control and State Register */
diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h
index fc97c551146..5af66bea144 100644
--- a/arch/arm/include/asm/armv8/mmu.h
+++ b/arch/arm/include/asm/armv8/mmu.h
@@ -104,6 +104,8 @@
 #define TCR_EL3_RSVD		(1 << 31 | 1 << 23)
 
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
+
 static inline void set_ttbr_tcr_mair(int el, u64 table, u64 tcr, u64 attr)
 {
 	asm volatile("dsb sy");
diff --git a/arch/arm/include/asm/armv8/sec_firmware.h b/arch/arm/include/asm/armv8/sec_firmware.h
index 9c010953f5f..b83f93f4415 100644
--- a/arch/arm/include/asm/armv8/sec_firmware.h
+++ b/arch/arm/include/asm/armv8/sec_firmware.h
@@ -7,6 +7,7 @@
 #define __SEC_FIRMWARE_H_
 
 #include <stdbool.h>
+#include <linux/types.h>
 
 #define PSCI_INVALID_VER		0xffffffff
 #define SEC_JR3_OFFSET			0x40000
diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h
index a2131ca07c5..5a41f0e52cc 100644
--- a/arch/arm/include/asm/bootm.h
+++ b/arch/arm/include/asm/bootm.h
@@ -8,6 +8,7 @@
 #ifndef ARM_BOOTM_H
 #define ARM_BOOTM_H
 
+#include <asm/types.h>
 extern void udc_disconnect(void);
 
 #if defined(CONFIG_SETUP_MEMORY_TAGS) || \
diff --git a/arch/arm/include/asm/ehci-omap.h b/arch/arm/include/asm/ehci-omap.h
index f970bba9375..fc8b619ecdb 100644
--- a/arch/arm/include/asm/ehci-omap.h
+++ b/arch/arm/include/asm/ehci-omap.h
@@ -11,6 +11,7 @@
 #ifndef _OMAP_COMMON_EHCI_H_
 #define _OMAP_COMMON_EHCI_H_
 
+#include <asm/types.h>
 enum usbhs_omap_port_mode {
 	OMAP_USBHS_PORT_MODE_UNUSED,
 	OMAP_EHCI_PORT_MODE_PHY,
diff --git a/arch/arm/include/asm/handoff.h b/arch/arm/include/asm/handoff.h
index 0790d2ab1e2..e1e1708b241 100644
--- a/arch/arm/include/asm/handoff.h
+++ b/arch/arm/include/asm/handoff.h
@@ -10,6 +10,7 @@
 #define __asm_handoff_h
 
 /**
+#include <linux/types.h>
  * struct arch_spl_handoff - architecture-specific handoff info
  *
  * @usable_ram_top: Value returned by board_get_usable_ram_top() in SPL
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index c53224bb2b8..d4b64375b8f 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -30,6 +30,7 @@
 #if 0	/* XXX###XXX */
 #include <asm/arch/hardware.h>
 #endif	/* XXX###XXX */
+#include <compiler.h>
 #include <linux/string.h>
 
 static inline void sync(void)
diff --git a/arch/arm/include/asm/iproc-common/iproc_sdhci.h b/arch/arm/include/asm/iproc-common/iproc_sdhci.h
index 4e299217fcf..7c4f35d23bc 100644
--- a/arch/arm/include/asm/iproc-common/iproc_sdhci.h
+++ b/arch/arm/include/asm/iproc-common/iproc_sdhci.h
@@ -7,6 +7,7 @@
 #ifndef __IPROC_SDHCI_H
 #define __IPROC_SDHCI_H
 
+#include <asm/types.h>
 int iproc_sdhci_init(int dev_index, u32 quirks);
 
 #endif
diff --git a/arch/arm/include/asm/kona-common/kona_sdhci.h b/arch/arm/include/asm/kona-common/kona_sdhci.h
index 22db651a4eb..f8887ceb4c9 100644
--- a/arch/arm/include/asm/kona-common/kona_sdhci.h
+++ b/arch/arm/include/asm/kona-common/kona_sdhci.h
@@ -6,6 +6,7 @@
 #ifndef __KONA_SDHCI_H
 #define __KONA_SDHCI_H
 
+#include <asm/types.h>
 int kona_sdhci_init(int dev_index, u32 min_clk, u32 quirks);
 
 #endif
diff --git a/arch/arm/include/asm/mach-imx/dma.h b/arch/arm/include/asm/mach-imx/dma.h
index 55eb84cb8e7..c4f76e93291 100644
--- a/arch/arm/include/asm/mach-imx/dma.h
+++ b/arch/arm/include/asm/mach-imx/dma.h
@@ -14,6 +14,7 @@
 #define __DMA_H__
 
 #include <asm/cache.h>
+#include <asm/types.h>
 #include <linux/list.h>
 #include <linux/compiler.h>
 
diff --git a/arch/arm/include/asm/mach-imx/gpio.h b/arch/arm/include/asm/mach-imx/gpio.h
index 1b7c9cd5249..fa6d2e0e7f4 100644
--- a/arch/arm/include/asm/mach-imx/gpio.h
+++ b/arch/arm/include/asm/mach-imx/gpio.h
@@ -9,6 +9,7 @@
 #define __ASM_ARCH_IMX_GPIO_H
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
+#include <asm/types.h>
 /* GPIO registers */
 struct gpio_regs {
 	u32 gpio_dr;	/* data */
diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h
index f89f750169b..41e20929019 100644
--- a/arch/arm/include/asm/mach-imx/hab.h
+++ b/arch/arm/include/asm/mach-imx/hab.h
@@ -7,6 +7,7 @@
 #ifndef __SECURE_MX6Q_H__
 #define __SECURE_MX6Q_H__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/types.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/include/asm/mach-imx/imx-nandbcb.h b/arch/arm/include/asm/mach-imx/imx-nandbcb.h
index 74c9031d4e7..4b3f4a53578 100644
--- a/arch/arm/include/asm/mach-imx/imx-nandbcb.h
+++ b/arch/arm/include/asm/mach-imx/imx-nandbcb.h
@@ -7,6 +7,7 @@
 #ifndef _IMX_NAND_BCB_H_
 #define _IMX_NAND_BCB_H_
 
+#include <asm/types.h>
 #define FCB_FINGERPRINT		0x20424346      /* 'FCB' */
 #define FCB_VERSION_1		0x01000000
 #define FCB_FINGERPRINT_OFF	0x4		/* FCB fingerprint offset*/
diff --git a/arch/arm/include/asm/mach-imx/module_fuse.h b/arch/arm/include/asm/mach-imx/module_fuse.h
index a46fc3f1f8e..781e62d6147 100644
--- a/arch/arm/include/asm/mach-imx/module_fuse.h
+++ b/arch/arm/include/asm/mach-imx/module_fuse.h
@@ -6,6 +6,7 @@
 #ifndef __MODULE_FUSE_H__
 #define __MODULE_FUSE_H__
 
+#include <linux/types.h>
 enum fuse_module_type {
 	MODULE_TSC,
 	MODULE_ADC1,
diff --git a/arch/arm/include/asm/mach-imx/mxc_i2c.h b/arch/arm/include/asm/mach-imx/mxc_i2c.h
index 81fd9814447..9a934c517b5 100644
--- a/arch/arm/include/asm/mach-imx/mxc_i2c.h
+++ b/arch/arm/include/asm/mach-imx/mxc_i2c.h
@@ -9,6 +9,7 @@
 #if CONFIG_IS_ENABLED(CLK)
 #include <clk.h>
 #endif
+#include <linux/types.h>
 
 struct i2c_pin_ctrl {
 	iomux_v3_cfg_t i2c_mode;
diff --git a/arch/arm/include/asm/mach-imx/rdc-sema.h b/arch/arm/include/asm/mach-imx/rdc-sema.h
index 70d6a76a9d7..7b4d1fdf952 100644
--- a/arch/arm/include/asm/mach-imx/rdc-sema.h
+++ b/arch/arm/include/asm/mach-imx/rdc-sema.h
@@ -13,6 +13,7 @@
  *      d3      d2      d1       d0    | master id  |  peri id
  *   d[x] means domain[x], x can be [3 - 0].
  */
+#include <asm/types.h>
 typedef u32 rdc_peri_cfg_t;
 typedef u32 rdc_ma_cfg_t;
 
diff --git a/arch/arm/include/asm/mach-imx/regs-apbh.h b/arch/arm/include/asm/mach-imx/regs-apbh.h
index 94c330c7f92..917e72e35ad 100644
--- a/arch/arm/include/asm/mach-imx/regs-apbh.h
+++ b/arch/arm/include/asm/mach-imx/regs-apbh.h
@@ -237,6 +237,7 @@ struct mxs_apbh_regs {
 };
 #endif
 
+#include <linux/types.h>
 #endif
 
 #define	APBH_CTRL0_SFTRST				(1 << 31)
diff --git a/arch/arm/include/asm/mach-imx/regs-bch.h b/arch/arm/include/asm/mach-imx/regs-bch.h
index 5a149002e2a..37b2e97f8e0 100644
--- a/arch/arm/include/asm/mach-imx/regs-bch.h
+++ b/arch/arm/include/asm/mach-imx/regs-bch.h
@@ -17,6 +17,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_bch_regs {
 	mxs_reg_32(hw_bch_ctrl)
 	mxs_reg_32(hw_bch_status0)
diff --git a/arch/arm/include/asm/mach-imx/regs-gpmi.h b/arch/arm/include/asm/mach-imx/regs-gpmi.h
index 33daa53c45d..6723caef6a1 100644
--- a/arch/arm/include/asm/mach-imx/regs-gpmi.h
+++ b/arch/arm/include/asm/mach-imx/regs-gpmi.h
@@ -15,6 +15,7 @@
 #include <asm/mach-imx/regs-common.h>
 
 #ifndef	__ASSEMBLY__
+#include <linux/types.h>
 struct mxs_gpmi_regs {
 	mxs_reg_32(hw_gpmi_ctrl0)
 	mxs_reg_32(hw_gpmi_compare)
diff --git a/arch/arm/include/asm/mach-imx/regs-lcdif.h b/arch/arm/include/asm/mach-imx/regs-lcdif.h
index 58746387966..67b961931a6 100644
--- a/arch/arm/include/asm/mach-imx/regs-lcdif.h
+++ b/arch/arm/include/asm/mach-imx/regs-lcdif.h
@@ -14,6 +14,7 @@
 
 #ifndef	__ASSEMBLY__
 #include <asm/mach-imx/regs-common.h>
+#include <linux/types.h>
 
 struct mxs_lcdif_regs {
 	mxs_reg_32(hw_lcdif_ctrl)		/* 0x00 */
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index ae33d6a9a49..5c87a0fcf1a 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/mach-imx/regs-common.h>
 #include <asm/mach-imx/module_fuse.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include "../arch-imx/cpu.h"
diff --git a/arch/arm/include/asm/mach-imx/syscounter.h b/arch/arm/include/asm/mach-imx/syscounter.h
index a2cae1edb81..a291b8ebec3 100644
--- a/arch/arm/include/asm/mach-imx/syscounter.h
+++ b/arch/arm/include/asm/mach-imx/syscounter.h
@@ -7,6 +7,7 @@
 #define _ASM_ARCH_SYSTEM_COUNTER_H
 
 /* System Counter */
+#include <asm/types.h>
 struct sctr_regs {
 	u32 cntcr;
 	u32 cntsr;
diff --git a/arch/arm/include/asm/mach-imx/video.h b/arch/arm/include/asm/mach-imx/video.h
index 1fdc2de662a..e31c68d12b9 100644
--- a/arch/arm/include/asm/mach-imx/video.h
+++ b/arch/arm/include/asm/mach-imx/video.h
@@ -5,6 +5,7 @@
 
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>
+#include <linux/types.h>
 
 struct display_info_t {
 	int	bus;
diff --git a/arch/arm/include/asm/omap_gpio.h b/arch/arm/include/asm/omap_gpio.h
index 151afa8f44c..c25032453a8 100644
--- a/arch/arm/include/asm/omap_gpio.h
+++ b/arch/arm/include/asm/omap_gpio.h
@@ -21,6 +21,7 @@
 #define _GPIO_H
 
 #include <asm/arch/cpu.h>
+#include <linux/types.h>
 
 #if CONFIG_IS_ENABLED(DM_GPIO)
 
diff --git a/arch/arm/include/asm/omap_i2c.h b/arch/arm/include/asm/omap_i2c.h
index a6975401dab..582d9c43867 100644
--- a/arch/arm/include/asm/omap_i2c.h
+++ b/arch/arm/include/asm/omap_i2c.h
@@ -14,6 +14,7 @@ struct omap_i2c_platdata {
 
 #endif
 
+#include <linux/types.h>
 enum {
 	OMAP_I2C_REV_V1 = 0,
 	OMAP_I2C_REV_V2 = 1,
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h
index 7933ad5a867..fbc83164a2b 100644
--- a/arch/arm/include/asm/omap_mmc.h
+++ b/arch/arm/include/asm/omap_mmc.h
@@ -28,6 +28,7 @@
 #include <mmc.h>
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 struct hsmmc {
diff --git a/arch/arm/include/asm/omap_musb.h b/arch/arm/include/asm/omap_musb.h
index b40ea005bec..feedd2725af 100644
--- a/arch/arm/include/asm/omap_musb.h
+++ b/arch/arm/include/asm/omap_musb.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <asm/types.h>
  * Board data structure for musb gadget on OMAPs
  *
  * Copyright (C) 2012, Ilya Yanok <ilya.yanok at gmail.com>
diff --git a/arch/arm/include/asm/omap_sec_common.h b/arch/arm/include/asm/omap_sec_common.h
index 30f0a9f5cbc..3331dcb55c6 100644
--- a/arch/arm/include/asm/omap_sec_common.h
+++ b/arch/arm/include/asm/omap_sec_common.h
@@ -13,6 +13,7 @@
  * the variable argument list into the format expected by the ROM code before
  * triggering the actual low-level smc entry.
  */
+#include <linux/types.h>
 u32 secure_rom_call(u32 service, u32 proc_id, u32 flag, ...);
 
 /*
diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h
index 64e5582c1f2..ce332e6558f 100644
--- a/arch/arm/include/asm/secure.h
+++ b/arch/arm/include/asm/secure.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct secure_svc_tbl {
 	u32	id;
 #ifdef CONFIG_ARMV8_PSCI
diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h
index 662bec86321..1e86def1de6 100644
--- a/arch/arm/include/asm/setjmp.h
+++ b/arch/arm/include/asm/setjmp.h
@@ -9,6 +9,7 @@
 
 /*
  * This really should be opaque, but the EFI implementation wrongly
+#include <asm/types.h>
  * assumes that a 'struct jmp_buf_data' is defined.
  */
 struct jmp_buf_data {
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 3a4e902af14..a4e3c69c6b9 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -13,6 +13,7 @@
  *
  * NOTE:
  *  This file contains two ways to pass information from the boot
+#include <asm/types.h>
  *  loader to the kernel. The old struct param_struct is deprecated,
  *  but it will be kept in the kernel for 5 years from now
  *  (2001). This will allow boot loaders to convert to the new struct
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index ce552944b70..2d5084b6d16 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -109,6 +109,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 struct pt_regs;
 
 u64 get_page_table_size(void);
diff --git a/arch/arm/include/asm/ti-common/davinci_nand.h b/arch/arm/include/asm/ti-common/davinci_nand.h
index 28842c3b155..dffcd9250ba 100644
--- a/arch/arm/include/asm/ti-common/davinci_nand.h
+++ b/arch/arm/include/asm/ti-common/davinci_nand.h
@@ -11,6 +11,7 @@
 
 #include <linux/mtd/rawnand.h>
 #include <asm/arch/hardware.h>
+#include <linux/types.h>
 
 #define NAND_READ_START  	0x00
 #define NAND_READ_END    	0x30
diff --git a/arch/arm/include/asm/ti-common/keystone_nav.h b/arch/arm/include/asm/ti-common/keystone_nav.h
index e577514428a..b61b8a64183 100644
--- a/arch/arm/include/asm/ti-common/keystone_nav.h
+++ b/arch/arm/include/asm/ti-common/keystone_nav.h
@@ -11,6 +11,7 @@
 
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define QM_OK                    0
 #define QM_ERR                  -1
diff --git a/arch/arm/include/asm/ti-common/keystone_net.h b/arch/arm/include/asm/ti-common/keystone_net.h
index 0852ce80a64..90884643c39 100644
--- a/arch/arm/include/asm/ti-common/keystone_net.h
+++ b/arch/arm/include/asm/ti-common/keystone_net.h
@@ -13,6 +13,7 @@
 #include <phy.h>
 #ifndef __ASSEMBLY__
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 
 /* EMAC */
diff --git a/arch/arm/include/asm/ti-common/keystone_serdes.h b/arch/arm/include/asm/ti-common/keystone_serdes.h
index 623438856d5..a3ca1eff2c3 100644
--- a/arch/arm/include/asm/ti-common/keystone_serdes.h
+++ b/arch/arm/include/asm/ti-common/keystone_serdes.h
@@ -10,6 +10,7 @@
 #define __TI_KEYSTONE_SERDES_H__
 
 /* SERDES Reference clock */
+#include <asm/types.h>
 enum ks2_serdes_clock {
 	SERDES_CLOCK_100M,		/* 100 MHz */
 	SERDES_CLOCK_122P88M,		/* 122.88 MHz */
diff --git a/arch/arm/include/asm/ti-common/sys_proto.h b/arch/arm/include/asm/ti-common/sys_proto.h
index a96a8382fb6..f3db16e54d6 100644
--- a/arch/arm/include/asm/ti-common/sys_proto.h
+++ b/arch/arm/include/asm/ti-common/sys_proto.h
@@ -7,6 +7,7 @@
 #define _TI_COMMON_SYS_PROTO_H_
 
 #include <asm/global_data.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/include/asm/ti-common/ti-edma3.h b/arch/arm/include/asm/ti-common/ti-edma3.h
index 9abdbc88e40..d5b98815a68 100644
--- a/arch/arm/include/asm/ti-common/ti-edma3.h
+++ b/arch/arm/include/asm/ti-common/ti-edma3.h
@@ -10,7 +10,9 @@
 #define _EDMA3_H_
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #endif
 #include <linux/stddef.h>
 
diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
index 0b93cc48c50..afb55b48818 100644
--- a/arch/arm/include/asm/u-boot-arm.h
+++ b/arch/arm/include/asm/u-boot-arm.h
@@ -15,6 +15,7 @@
 #ifndef __ASSEMBLY__
 
 /* for the following variables, see start.S */
+#include <linux/types.h>
 extern ulong IRQ_STACK_START;	/* top of IRQ stack */
 extern ulong FIQ_STACK_START;	/* top of FIQ stack */
 extern ulong _datarel_start_ofs;
diff --git a/arch/arm/include/asm/utils.h b/arch/arm/include/asm/utils.h
index eee60c50e99..481cbd64ff8 100644
--- a/arch/arm/include/asm/utils.h
+++ b/arch/arm/include/asm/utils.h
@@ -7,6 +7,7 @@
 #ifndef _UTILS_H_
 #define _UTILS_H_
 
+#include <asm/types.h>
 static inline s32 log_2_n_round_up(u32 n)
 {
 	s32 log2n = -1;
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index 72a86f7defe..e21cf6c1a50 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdt_support.h>
 #ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a11fe7ed31e..40ce3c7a04b 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
@@ -28,6 +29,7 @@
 #include <env.h>
 #include <image.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <linux/libfdt.h>
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 39d51859ed7..b7f9baa74ac 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
 #include <stdio.h>
@@ -15,6 +16,7 @@
 #include <linux/compiler.h>
 #include <asm/armv7_mpu.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
 
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 6509052ddcf..870d4c7d659 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -7,6 +7,7 @@
 /* for now: just dummy functions to satisfy the linker */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
 #include <malloc.h>
@@ -14,6 +15,7 @@
 #include <asm/cache.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c
index c905ecc4bd9..00d58816dca 100644
--- a/arch/arm/lib/cmd_boot.c
+++ b/arch/arm/lib/cmd_boot.c
@@ -19,6 +19,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <linux/types.h>
 
 /*
  * ARMv7M does not support ARM instruction mode. However, the
diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index 9e2912ffe39..3e13dbb6ab6 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int raise (int signum)
 {
diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
index 4fc9f9b7833..6b884ac375a 100644
--- a/arch/arm/lib/gic-v3-its.c
+++ b/arch/arm/lib/gic-v3-its.c
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 static u32 lpi_id_bits;
 
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 5dfa8eff31a..47776bd7ba8 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -7,12 +7,14 @@
 #include <common.h>
 #include <image.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index af65144f7a7..fafe4b04d9b 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -27,6 +27,7 @@
 #include <asm/proc-armv/ptrace.h>
 #include <asm/ptrace.h>
 #include <asm/u-boot-arm.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index 9e8d8eb6f1a..9c228333d30 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -5,11 +5,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <irq_func.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <efi_loader.h>
diff --git a/arch/arm/lib/reloc_aarch64_efi.c b/arch/arm/lib/reloc_aarch64_efi.c
index 1aa57dbc80d..5aab6acec5a 100644
--- a/arch/arm/lib/reloc_aarch64_efi.c
+++ b/arch/arm/lib/reloc_aarch64_efi.c
@@ -35,6 +35,7 @@
 */
 
 #include <efi.h>
+#include <linux/types.h>
 
 #include <elf.h>
 
diff --git a/arch/arm/lib/reloc_arm_efi.c b/arch/arm/lib/reloc_arm_efi.c
index 9103c035c54..bf07a63c487 100644
--- a/arch/arm/lib/reloc_arm_efi.c
+++ b/arch/arm/lib/reloc_arm_efi.c
@@ -13,6 +13,7 @@
 
 #include <efi.h>
 #include <elf.h>
+#include <linux/types.h>
 
 efi_status_t EFIAPI _relocate(long ldbase, Elf32_Dyn *dyn)
 {
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 109ed120482..904eeaaf26e 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/u-boot.h>
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 8b09d87cb16..685351c59f9 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SYSOPEN		0x01
 #define SYSCLOSE	0x02
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 2dbbc53c516..66cafd41800 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <init.h>
 #include <log.h>
@@ -18,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mach-types.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SPL_DM
 /* Pointer to as well as the global data structure for SPL */
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index b5155c2a914..08f55927db5 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -7,8 +7,10 @@
  * Copyright (C) 2012 Marek Vasut <marek.vasut at gmail.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <image.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
 #define	BAREBOX_IMAGE_MAGIC	0x00786f62
diff --git a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
index 9eefeef5fb3..e6618d4c76e 100644
--- a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <dt-bindings/clock/ast2500-scu.h>
+#include <linux/types.h>
 
 /* These configuration parameters are taken from Aspeed SDK */
 #define DDR4_MR46_MODE		0x08000000
diff --git a/arch/arm/mach-aspeed/ast_wdt.c b/arch/arm/mach-aspeed/ast_wdt.c
index 5bc442ef33c..461d20303e3 100644
--- a/arch/arm/mach-aspeed/ast_wdt.c
+++ b/arch/arm/mach-aspeed/ast_wdt.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch/wdt.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 u32 ast_reset_mode_from_flags(ulong flags)
 {
diff --git a/arch/arm/mach-at91/arm920t/clock.c b/arch/arm/mach-at91/arm920t/clock.c
index 57cb159d1f6..b73864c6977 100644
--- a/arch/arm/mach-at91/arm920t/clock.c
+++ b/arch/arm/mach-at91/arm920t/clock.c
@@ -15,6 +15,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/clk.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_AT91FAMILY)
 # error You need to define CONFIG_AT91FAMILY in your board config!
diff --git a/arch/arm/mach-at91/arm920t/reset.c b/arch/arm/mach-at91/arm920t/reset.c
index d92bc57d669..a264b2b1c54 100644
--- a/arch/arm/mach-at91/arm920t/reset.c
+++ b/arch/arm/mach-at91/arm920t/reset.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_st.h>
+#include <linux/types.h>
 
 void  __attribute__((weak)) board_reset(void)
 {
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index c400e878135..fa0e582f062 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -18,6 +18,7 @@
 #include <time.h>
 #include <asm/global_data.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/arm926ejs/clock.c b/arch/arm/mach-at91/arm926ejs/clock.c
index 97e45fffd1d..6a742766d4e 100644
--- a/arch/arm/mach-at91/arm926ejs/clock.c
+++ b/arch/arm/mach-at91/arm926ejs/clock.c
@@ -15,6 +15,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/clk.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_AT91FAMILY)
 # error You need to define CONFIG_AT91FAMILY in your board config!
diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c
index 9fb8b98944a..f64aa14a6b2 100644
--- a/arch/arm/mach-at91/arm926ejs/cpu.c
+++ b/arch/arm/mach-at91/arm926ejs/cpu.c
@@ -16,6 +16,7 @@
 #include <asm/arch/at91_gpbr.h>
 #include <asm/arch/clk.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SYS_AT91_MAIN_CLOCK
 #define CONFIG_SYS_AT91_MAIN_CLOCK 0
diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index ca52791d5bc..9a727b5c163 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -52,6 +52,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_eefc.h>
 #include <asm/arch/at91_dbu.h>
+#include <linux/types.h>
 
 /* checks to detect configuration errors */
 #if CONFIG_SYS_MAX_FLASH_BANKS!=1
diff --git a/arch/arm/mach-at91/arm926ejs/reset.c b/arch/arm/mach-at91/arm926ejs/reset.c
index 56fbbd991e5..6a604d2432c 100644
--- a/arch/arm/mach-at91/arm926ejs/reset.c
+++ b/arch/arm/mach-at91/arm926ejs/reset.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_rstc.h>
+#include <linux/types.h>
 
 /* Reset the cpu by telling the reset controller to do so */
 void reset_cpu(ulong ignored)
diff --git a/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c
index a8cf0e4bd79..b479feeca4d 100644
--- a/arch/arm/mach-at91/arm926ejs/timer.c
+++ b/arch/arm/mach-at91/arm926ejs/timer.c
@@ -14,6 +14,7 @@
 #include <asm/arch/at91_pit.h>
 #include <asm/arch/clk.h>
 #include <div64.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_AT91FAMILY)
 # error You need to define CONFIG_AT91FAMILY in your board config!
diff --git a/arch/arm/mach-at91/armv7/clock.c b/arch/arm/mach-at91/armv7/clock.c
index 7fab52d1e7e..984b9033e41 100644
--- a/arch/arm/mach-at91/armv7/clock.c
+++ b/arch/arm/mach-at91/armv7/clock.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index b40834bcbe3..04815b01054 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -19,6 +19,7 @@
 #include <asm/arch/at91_gpbr.h>
 #include <asm/arch/clk.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SYS_AT91_MAIN_CLOCK
 #define CONFIG_SYS_AT91_MAIN_CLOCK 0
diff --git a/arch/arm/mach-at91/armv7/reset.c b/arch/arm/mach-at91/armv7/reset.c
index 8f4c81d1afd..08e0e69359d 100644
--- a/arch/arm/mach-at91/armv7/reset.c
+++ b/arch/arm/mach-at91/armv7/reset.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_rstc.h>
+#include <linux/types.h>
 
 /* Reset the cpu by telling the reset controller to do so */
 void reset_cpu(ulong ignored)
diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c
index 1f54c5dcad9..edb9eefe71e 100644
--- a/arch/arm/mach-at91/armv7/timer.c
+++ b/arch/arm/mach-at91/armv7/timer.c
@@ -17,6 +17,7 @@
 #include <asm/arch/at91_pit.h>
 #include <asm/arch/clk.h>
 #include <div64.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_AT91FAMILY)
 # error You need to define CONFIG_AT91FAMILY in your board config!
diff --git a/arch/arm/mach-at91/atmel_sfr.c b/arch/arm/mach-at91/atmel_sfr.c
index c2677c51c0c..a80afaa90a1 100644
--- a/arch/arm/mach-at91/atmel_sfr.c
+++ b/arch/arm/mach-at91/atmel_sfr.c
@@ -9,6 +9,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/arch/at91_sfr.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_SAMA5D2) || defined(CONFIG_SAMA5D4)
 void redirect_int_from_saic_to_aic(void)
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index f9723bd145e..714ff6b0d31 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -13,6 +13,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_wdt.h>
+#include <linux/types.h>
 
 #define EN_UPLL_TIMEOUT		500
 
diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h
index f3551832f3a..a226f7eea72 100644
--- a/arch/arm/mach-at91/include/mach/at91_common.h
+++ b/arch/arm/mach-at91/include/mach/at91_common.h
@@ -9,6 +9,7 @@
 #define AT91_COMMON_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 void at91_can_hw_init(void);
 void at91_gmac_hw_init(void);
 void at91_macb_hw_init(void);
diff --git a/arch/arm/mach-at91/include/mach/at91_dbu.h b/arch/arm/mach-at91/include/mach/at91_dbu.h
index 91bb686bc10..5592cb903ce 100644
--- a/arch/arm/mach-at91/include/mach/at91_dbu.h
+++ b/arch/arm/mach-at91/include/mach/at91_dbu.h
@@ -12,6 +12,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_dbu {
 	u32	cr;	/* Control Register WO */
 	u32	mr;	/* Mode Register  RW */
diff --git a/arch/arm/mach-at91/include/mach/at91_eefc.h b/arch/arm/mach-at91/include/mach/at91_eefc.h
index e7bb2bfecba..6c38f51e980 100644
--- a/arch/arm/mach-at91/include/mach/at91_eefc.h
+++ b/arch/arm/mach-at91/include/mach/at91_eefc.h
@@ -12,6 +12,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_eefc {
 	u32	fmr;	/* Flash Mode Register RW */
 	u32	fcr;	/* Flash Command Register WO */
diff --git a/arch/arm/mach-at91/include/mach/at91_emac.h b/arch/arm/mach-at91/include/mach/at91_emac.h
index 44b943be3dc..397ed032d44 100644
--- a/arch/arm/mach-at91/include/mach/at91_emac.h
+++ b/arch/arm/mach-at91/include/mach/at91_emac.h
@@ -8,6 +8,7 @@
 #ifndef AT91_H
 #define AT91_H
 
+#include <asm/types.h>
 typedef struct at91_emac {
 	u32	 ctl;
 	u32	 cfg;
diff --git a/arch/arm/mach-at91/include/mach/at91_gpbr.h b/arch/arm/mach-at91/include/mach/at91_gpbr.h
index ac1bb1cf01a..576685a2920 100644
--- a/arch/arm/mach-at91/include/mach/at91_gpbr.h
+++ b/arch/arm/mach-at91/include/mach/at91_gpbr.h
@@ -32,6 +32,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_gpbr {
 	u32 reg[4];
 } at91_gpbr_t;
diff --git a/arch/arm/mach-at91/include/mach/at91_matrix.h b/arch/arm/mach-at91/include/mach/at91_matrix.h
index d98fcf51051..a7c9281356f 100644
--- a/arch/arm/mach-at91/include/mach/at91_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91_matrix.h
@@ -23,6 +23,7 @@
 #define AT91_ASM_MATRIX_MCFG	ATMEL_BASE_MATRIX
 
 #else
+#include <asm/types.h>
 #if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 #define AT91_MATRIX_MASTERS	6
 #define AT91_MATRIX_SLAVES	5
diff --git a/arch/arm/mach-at91/include/mach/at91_mc.h b/arch/arm/mach-at91/include/mach/at91_mc.h
index 18b0e163c09..4d7dd361b14 100644
--- a/arch/arm/mach-at91/include/mach/at91_mc.h
+++ b/arch/arm/mach-at91/include/mach/at91_mc.h
@@ -15,6 +15,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_ebi {
 	u32 	csa;		/* 0x00 Chip Select Assignment Register */
 	u32	cfgr;		/* 0x04 Configuration Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_pdc.h b/arch/arm/mach-at91/include/mach/at91_pdc.h
index a855a7177ac..16115b2e81b 100644
--- a/arch/arm/mach-at91/include/mach/at91_pdc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pdc.h
@@ -6,6 +6,7 @@
 #ifndef AT91_PDC_H
 #define AT91_PDC_H
 
+#include <asm/types.h>
 typedef struct at91_pdc {
 	u32	rpr;		/* 0x100 Receive Pointer Register */
 	u32	rcr;		/* 0x104 Receive Counter Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h b/arch/arm/mach-at91/include/mach/at91_pio.h
index f51e47e55d5..60e36e753e8 100644
--- a/arch/arm/mach-at91/include/mach/at91_pio.h
+++ b/arch/arm/mach-at91/include/mach/at91_pio.h
@@ -35,6 +35,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_port {
 	u32	per;		/* 0x00 PIO Enable Register */
 	u32	pdr;		/* 0x04 PIO Disable Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_pit.h b/arch/arm/mach-at91/include/mach/at91_pit.h
index dfaf2e02608..bed0304a47f 100644
--- a/arch/arm/mach-at91/include/mach/at91_pit.h
+++ b/arch/arm/mach-at91/include/mach/at91_pit.h
@@ -12,6 +12,7 @@
 #ifndef AT91_PIT_H
 #define AT91_PIT_H
 
+#include <asm/types.h>
 typedef struct at91_pit {
 	u32	mr;	/* 0x00 Mode Register */
 	u32	sr;	/* 0x04 Status Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_rstc.h b/arch/arm/mach-at91/include/mach/at91_rstc.h
index 11ffe4454a6..c1846de3ae1 100644
--- a/arch/arm/mach-at91/include/mach/at91_rstc.h
+++ b/arch/arm/mach-at91/include/mach/at91_rstc.h
@@ -18,6 +18,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_rstc {
 	u32	cr;	/* Reset Controller Control Register */
 	u32	sr;	/* Reset Controller Status Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_rtt.h b/arch/arm/mach-at91/include/mach/at91_rtt.h
index ba88c441e33..3d39328873f 100644
--- a/arch/arm/mach-at91/include/mach/at91_rtt.h
+++ b/arch/arm/mach-at91/include/mach/at91_rtt.h
@@ -12,6 +12,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct at91_rtt {
 	u32	mr;	/* Mode Register   RW 0x00008000 */
 	u32	ar;	/* Alarm Register  RW 0xFFFFFFFF */
diff --git a/arch/arm/mach-at91/include/mach/at91_sfr.h b/arch/arm/mach-at91/include/mach/at91_sfr.h
index 4517df41bce..1044f6b77a9 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 <asm/types.h>
 #include <linux/bitops.h>
 struct atmel_sfr {
 	u32 reserved1;	/* 0x00 */
diff --git a/arch/arm/mach-at91/include/mach/at91_spi.h b/arch/arm/mach-at91/include/mach/at91_spi.h
index ce7bbf276d0..4f1f5fca3ba 100644
--- a/arch/arm/mach-at91/include/mach/at91_spi.h
+++ b/arch/arm/mach-at91/include/mach/at91_spi.h
@@ -13,6 +13,7 @@
 #define AT91_SPI_H
 
 #include <asm/arch/at91_pdc.h>
+#include <asm/types.h>
 
 typedef struct at91_spi {
 	u32		cr;		/* 0x00 Control Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_st.h b/arch/arm/mach-at91/include/mach/at91_st.h
index ec4658a3917..24f5bad6017 100644
--- a/arch/arm/mach-at91/include/mach/at91_st.h
+++ b/arch/arm/mach-at91/include/mach/at91_st.h
@@ -6,6 +6,7 @@
 #ifndef AT91_ST_H
 #define AT91_ST_H
 
+#include <asm/types.h>
 typedef struct at91_st {
 
 	u32	cr;
diff --git a/arch/arm/mach-at91/include/mach/at91_tc.h b/arch/arm/mach-at91/include/mach/at91_tc.h
index eb6950ab28c..0ddc0103429 100644
--- a/arch/arm/mach-at91/include/mach/at91_tc.h
+++ b/arch/arm/mach-at91/include/mach/at91_tc.h
@@ -6,6 +6,7 @@
 #ifndef AT91_TC_H
 #define AT91_TC_H
 
+#include <asm/types.h>
 typedef struct at91_tcc {
 	u32		ccr;	/* 0x00 Channel Control Register */
 	u32		cmr;	/* 0x04 Channel Mode Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h
index 8ef8e007d77..1f1d81ef1ca 100644
--- a/arch/arm/mach-at91/include/mach/at91_wdt.h
+++ b/arch/arm/mach-at91/include/mach/at91_wdt.h
@@ -19,6 +19,8 @@
 
 #else
 
+#include <compiler.h>
+#include <asm/types.h>
 typedef struct at91_wdt {
 	u32	cr;
 	u32	mr;
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
index 7271129f6be..bb39119d55f 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
@@ -14,6 +14,7 @@
 #ifndef __ASSEMBLY__
 
 /*
+#include <asm/types.h>
  * This struct defines access to the matrix' maximum of
  * 16 masters and 16 slaves.
  * However, on the AT91SAM9260/9G20/9XE there exist only
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
index b856759b1db..d2f3345b4bd 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
@@ -13,6 +13,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct at91_matrix {
 	u32	mcfg;	/* Master Configuration Registers */
 	u32	scfg[5];	/* Slave Configuration Registers */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
index f08d2eb1fac..fd2aaad5a17 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
@@ -14,6 +14,7 @@
 #ifndef __ASSEMBLY__
 
 /*
+#include <asm/types.h>
  * This struct defines access to the matrix' maximum of
  * 16 masters and 16 slaves.
  * Note: not all masters/slaves are available
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
index 64abf70c5b4..9feabe9252f 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
@@ -25,6 +25,7 @@
 #define AT91_ASM_SDRAMC_MDR	(ATMEL_BASE_SDRAMC + 0x24)
 
 #else
+#include <asm/types.h>
 struct sdramc_reg {
 	u32	mr;
 	u32	tr;
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
index 404ffaad442..f4045b1173e 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_smc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
@@ -24,6 +24,7 @@
 #define AT91_ASM_SMC_MODE0	(ATMEL_BASE_SMC + 0x0C)
 
 #else
+#include <asm/types.h>
 
 typedef struct	at91_cs {
 	u32	setup;		/* 0x00 SMC Setup Register */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
index 62d4901bc1c..fde18a212e8 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
@@ -13,6 +13,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct at91_matrix {
 	u32	mcfg[16];
 	u32	scfg[16];
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
index 295f768b552..b798c181b46 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
@@ -16,6 +16,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct at91_matrix {
 	u32	mcfg[16];	/* Master Configuration Registers */
 	u32	scfg[16];	/* Slave Configuration Registers */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
index 8288090d5a1..ddb6b1aec89 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
@@ -14,6 +14,7 @@
 #ifndef __ASSEMBLY__
 
 /* AT91SAM9N12 Matrix definition is a subset of AT91SAM9X5. */
+#include <asm/types.h>
 struct at91_matrix {
 	u32	mcfg[16];
 	u32	scfg[16];
diff --git a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
index 40ec87e2ff9..d68c93cdd3c 100644
--- a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
+++ b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
@@ -10,6 +10,7 @@
 #ifndef __ATMEL_MPDDRC_H__
 #define __ATMEL_MPDDRC_H__
 
+#include <asm/types.h>
 struct atmel_mpddrc_config {
 	u32 mr;
 	u32 rtr;
diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h
index f348b05bc85..c87ca43d9f9 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 <asm/types.h>
 #include <linux/bitops.h>
 struct atmel_pio4_port {
 	u32 mskr;		/* 0x00 PIO Mask Register */
diff --git a/arch/arm/mach-at91/include/mach/atmel_sdhci.h b/arch/arm/mach-at91/include/mach/atmel_sdhci.h
index 48b6bd22368..5c237a0a687 100644
--- a/arch/arm/mach-at91/include/mach/atmel_sdhci.h
+++ b/arch/arm/mach-at91/include/mach/atmel_sdhci.h
@@ -7,6 +7,7 @@
 #ifndef __ATMEL_SDHCI_H
 #define __ATMEL_SDHCI_H
 
+#include <asm/types.h>
 int atmel_sdhci_init(void *regbase, u32 id);
 
 #endif
diff --git a/arch/arm/mach-at91/include/mach/atmel_serial.h b/arch/arm/mach-at91/include/mach/atmel_serial.h
index c53a509ff8b..6f348225645 100644
--- a/arch/arm/mach-at91/include/mach/atmel_serial.h
+++ b/arch/arm/mach-at91/include/mach/atmel_serial.h
@@ -7,6 +7,7 @@
 #define _ATMEL_SERIAL_H
 
 /* Information about a serial port */
+#include <linux/types.h>
 struct atmel_serial_platdata {
 	uint32_t base_addr;
 };
diff --git a/arch/arm/mach-at91/include/mach/clk.h b/arch/arm/mach-at91/include/mach/clk.h
index c1d92739e47..f6ceea2b2b2 100644
--- a/arch/arm/mach-at91/include/mach/clk.h
+++ b/arch/arm/mach-at91/include/mach/clk.h
@@ -11,6 +11,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 
 #define GCK_CSS_SLOW_CLK	0
 #define GCK_CSS_MAIN_CLK	1
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
index 575c6436ad3..1cbe1fcba16 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/hardware.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_ATMEL_LEGACY
 
diff --git a/arch/arm/mach-at91/include/mach/sama5_matrix.h b/arch/arm/mach-at91/include/mach/sama5_matrix.h
index 2a92d701610..8f315efdb10 100644
--- a/arch/arm/mach-at91/include/mach/sama5_matrix.h
+++ b/arch/arm/mach-at91/include/mach/sama5_matrix.h
@@ -9,6 +9,7 @@
 #ifndef __SAMA5_MATRIX_H
 #define __SAMA5_MATRIX_H
 
+#include <asm/types.h>
 struct atmel_matrix {
 	u32 mcfg[16];	/* 0x00 ~ 0x3c: Master Configuration Register */
 	u32 scfg[16];	/* 0x40 ~ 0x7c: Slave Configuration Register */
diff --git a/arch/arm/mach-at91/include/mach/sama5d2_smc.h b/arch/arm/mach-at91/include/mach/sama5d2_smc.h
index 928a078f5f4..03f04af9302 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2_smc.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2_smc.h
@@ -16,6 +16,7 @@
 #define AT91_ASM_SMC_TIMINGS0	(ATMEL_BASE_SMC + 0x70c)
 #define AT91_ASM_SMC_MODE0	(ATMEL_BASE_SMC + 0x710)
 #else
+#include <asm/types.h>
 struct at91_cs {
 	u32	setup;		/* 0x600 SMC Setup Register */
 	u32	pulse;		/* 0x604 SMC Pulse Register */
diff --git a/arch/arm/mach-at91/include/mach/sama5d3_smc.h b/arch/arm/mach-at91/include/mach/sama5d3_smc.h
index 547e7b72f4a..9c2b8461b70 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3_smc.h
+++ b/arch/arm/mach-at91/include/mach/sama5d3_smc.h
@@ -16,6 +16,7 @@
 #define AT91_ASM_SMC_TIMINGS0	(ATMEL_BASE_SMC + 0x60c)
 #define AT91_ASM_SMC_MODE0	(ATMEL_BASE_SMC + 0x610)
 #else
+#include <asm/types.h>
 struct at91_cs {
 	u32	setup;		/* 0x600 SMC Setup Register */
 	u32	pulse;		/* 0x604 SMC Pulse Register */
diff --git a/arch/arm/mach-at91/mpddrc.c b/arch/arm/mach-at91/mpddrc.c
index 5422c05456e..a2bcf4924c8 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 <asm/types.h>
 #include <linux/delay.h>
 
 #define SAMA5D3_MPDDRC_VERSION		0x140
diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
index 217fcfa6689..32e154922be 100644
--- a/arch/arm/mach-at91/spl.c
+++ b/arch/arm/mach-at91/spl.c
@@ -12,6 +12,7 @@
 #include <asm/arch/at91_wdt.h>
 #include <asm/arch/clk.h>
 #include <spl.h>
+#include <asm/types.h>
 
 #if !defined(CONFIG_WDT_AT91)
 void at91_disable_wdt(void)
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index d0c73253924..e3b85d3c541 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <asm/arch/at91_wdt.h>
 #include <asm/arch/clk.h>
 #include <spl.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index 526379fae1a..0a3777176bb 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <asm/arch/clk.h>
 #include <spl.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static void switch_to_main_crystal_osc(void)
 {
diff --git a/arch/arm/mach-bcm283x/include/mach/gpio.h b/arch/arm/mach-bcm283x/include/mach/gpio.h
index 3263de9a352..840388815a1 100644
--- a/arch/arm/mach-bcm283x/include/mach/gpio.h
+++ b/arch/arm/mach-bcm283x/include/mach/gpio.h
@@ -8,6 +8,7 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
+#include <asm/types.h>
 #define BCM2835_GPIO_COUNT		54
 
 #define BCM2835_GPIO_FSEL_MASK		0x7
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index 70029eefded..61586eb8591 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -6,7 +6,9 @@
 #ifndef _BCM2835_MBOX_H
 #define _BCM2835_MBOX_H
 
+#include <compiler.h>
 #include <asm/arch/base.h>
+#include <asm/types.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-bcm283x/include/mach/msg.h b/arch/arm/mach-bcm283x/include/mach/msg.h
index e45c1bf010f..483fb5b0e14 100644
--- a/arch/arm/mach-bcm283x/include/mach/msg.h
+++ b/arch/arm/mach-bcm283x/include/mach/msg.h
@@ -12,6 +12,7 @@
  * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...)
  * @return 0 if OK, -EIO on error
  */
+#include <linux/types.h>
 int bcm2835_power_on_module(u32 module);
 
 /**
diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h
index 73236906870..481dc091439 100644
--- a/arch/arm/mach-bcm283x/include/mach/sdhci.h
+++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h
@@ -7,6 +7,7 @@
 #define _BCM2835_SDHCI_H_
 
 #include <asm/arch/base.h>
+#include <asm/types.h>
 
 #define BCM2835_SDHCI_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \
 				  rpi_bcm283x_base + 0x00300000; })
diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h
index 99426667205..2d8d7e0b0a3 100644
--- a/arch/arm/mach-bcm283x/include/mach/wdog.h
+++ b/arch/arm/mach-bcm283x/include/mach/wdog.h
@@ -7,6 +7,7 @@
 #define _BCM2835_WDOG_H
 
 #include <asm/arch/base.h>
+#include <asm/types.h>
 
 #define BCM2835_WDOG_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \
 				 rpi_bcm283x_base + 0x00100000; })
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index c80c77e0fcc..70e1e22ebdc 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -13,6 +13,7 @@
 #include <asm/u-boot.h>
 #include <dm/device.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 #define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS	0x600000000UL
 #define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x800000UL
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 0c8cf78c188..8d036a18755 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -14,6 +14,7 @@
 #include <asm/arch/mbox.h>
 #include <phys2bus.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define TIMEOUT 1000 /* ms */
 
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index 3c3eac9025b..57411b9d600 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -10,6 +10,7 @@
 #include <asm/arch/mbox.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct msg_set_power_state {
 	struct bcm2835_mbox_hdr hdr;
diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c
index 2b4ccd47279..0d39bbdcf46 100644
--- a/arch/arm/mach-bcm283x/reset.c
+++ b/arch/arm/mach-bcm283x/reset.c
@@ -12,6 +12,7 @@
 #include <asm/arch/base.h>
 #include <asm/arch/wdog.h>
 #include <efi_loader.h>
+#include <linux/types.h>
 
 #define RESET_TIMEOUT 10
 
diff --git a/arch/arm/mach-bcmstb/include/mach/timer.h b/arch/arm/mach-bcmstb/include/mach/timer.h
index 039dd664c2c..8767a4602f6 100644
--- a/arch/arm/mach-bcmstb/include/mach/timer.h
+++ b/arch/arm/mach-bcmstb/include/mach/timer.h
@@ -8,6 +8,7 @@
 #ifndef _BCMSTB_TIMER_H
 #define _BCMSTB_TIMER_H
 
+#include <linux/types.h>
 uint64_t get_ticks(void);
 
 #endif /* _BCMSTB_TIMER_H */
diff --git a/arch/arm/mach-davinci/include/mach/davinci_misc.h b/arch/arm/mach-davinci/include/mach/davinci_misc.h
index 41b2c6648ec..711fb4b3d14 100644
--- a/arch/arm/mach-davinci/include/mach/davinci_misc.h
+++ b/arch/arm/mach-davinci/include/mach/davinci_misc.h
@@ -8,6 +8,7 @@
 
 #include <asm/arch/hardware.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* pin muxer definitions */
 #define PIN_MUX_NUM_FIELDS	8	/* Per register */
diff --git a/arch/arm/mach-davinci/include/mach/dm365_lowlevel.h b/arch/arm/mach-davinci/include/mach/dm365_lowlevel.h
index eb1488e7442..000e32f0574 100644
--- a/arch/arm/mach-davinci/include/mach/dm365_lowlevel.h
+++ b/arch/arm/mach-davinci/include/mach/dm365_lowlevel.h
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 void dm365_waitloop(unsigned long loopcnt);
 int dm365_pll1_init(unsigned long pllmult, unsigned long prediv);
diff --git a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h
index e1851c5ae4e..6c28974f68d 100644
--- a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h
+++ b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h
@@ -10,6 +10,7 @@
 
 #include <asm/arch/hardware.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* MMC Control Reg fields */
 #define MMCCTL_DATRST		(1 << 0)
diff --git a/arch/arm/mach-davinci/include/mach/timer_defs.h b/arch/arm/mach-davinci/include/mach/timer_defs.h
index 110e67e454c..f880b7ef927 100644
--- a/arch/arm/mach-davinci/include/mach/timer_defs.h
+++ b/arch/arm/mach-davinci/include/mach/timer_defs.h
@@ -6,6 +6,7 @@
 #ifndef _TIMER_DEFS_H_
 #define _TIMER_DEFS_H_
 
+#include <linux/types.h>
 struct davinci_timer {
 	u_int32_t	pid12;
 	u_int32_t	emumgt;
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index 6ae7ab2887a..e19a300f390 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index 9e14284ab02..a9732fc5264 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <spi_flash.h>
 #include <mmc.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SPL_LIBCOMMON_SUPPORT
 void puts(const char *str)
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index 43e0574901e..562363af34f 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -28,6 +28,7 @@
 #include <asm/arch/timer_defs.h>
 #include <div64.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
index 33995ff4ec6..bd570b9e341 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/periph.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define PLL_DIV_1024	1024
 #define PLL_DIV_65535	65535
diff --git a/arch/arm/mach-exynos/clock_init.h b/arch/arm/mach-exynos/clock_init.h
index a4d3fdae851..6d0fe3a5bcc 100644
--- a/arch/arm/mach-exynos/clock_init.h
+++ b/arch/arm/mach-exynos/clock_init.h
@@ -8,6 +8,7 @@
 #ifndef __EXYNOS_CLOCK_INIT_H
 #define __EXYNOS_CLOCK_INIT_H
 
+#include <linux/types.h>
 enum {
 #ifdef CONFIG_EXYNOS5420
 	MEM_TIMINGS_MSR_COUNT	= 5,
diff --git a/arch/arm/mach-exynos/clock_init_exynos5.c b/arch/arm/mach-exynos/clock_init_exynos5.c
index cf83ef9391a..c5e2380e516 100644
--- a/arch/arm/mach-exynos/clock_init_exynos5.c
+++ b/arch/arm/mach-exynos/clock_init_exynos5.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/spl.h>
 #include <asm/arch/dwmmc.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #include "clock_init.h"
diff --git a/arch/arm/mach-exynos/common_setup.h b/arch/arm/mach-exynos/common_setup.h
index 4e3702b9285..afae76531a9 100644
--- a/arch/arm/mach-exynos/common_setup.h
+++ b/arch/arm/mach-exynos/common_setup.h
@@ -24,6 +24,7 @@
  */
 
 #include <asm/arch/system.h>
+#include <linux/types.h>
 
 #define DMC_OFFSET	0x10000
 
diff --git a/arch/arm/mach-exynos/dmc_common.c b/arch/arm/mach-exynos/dmc_common.c
index 44923dd5520..880e9fc2b66 100644
--- a/arch/arm/mach-exynos/dmc_common.c
+++ b/arch/arm/mach-exynos/dmc_common.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/arch/spl.h>
+#include <linux/types.h>
 
 #include "clock_init.h"
 #include "common_setup.h"
diff --git a/arch/arm/mach-exynos/dmc_init_ddr3.c b/arch/arm/mach-exynos/dmc_init_ddr3.c
index 2cf3c2fa06a..0c0b68391b6 100644
--- a/arch/arm/mach-exynos/dmc_init_ddr3.c
+++ b/arch/arm/mach-exynos/dmc_init_ddr3.c
@@ -14,6 +14,7 @@
 #include <asm/arch/dmc.h>
 #include <asm/arch/power.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "common_setup.h"
 #include "exynos5_setup.h"
 #include "clock_init.h"
diff --git a/arch/arm/mach-exynos/exynos5_setup.h b/arch/arm/mach-exynos/exynos5_setup.h
index bf4cca9e193..7bb31e917dc 100644
--- a/arch/arm/mach-exynos/exynos5_setup.h
+++ b/arch/arm/mach-exynos/exynos5_setup.h
@@ -10,6 +10,7 @@
 
 #include <config.h>
 #include <asm/arch/dmc.h>
+#include <linux/types.h>
 
 #define NOT_AVAILABLE		0
 #define DATA_MASK		0xFFFFF
diff --git a/arch/arm/mach-exynos/include/mach/mmc.h b/arch/arm/mach-exynos/include/mach/mmc.h
index eece44ea1aa..88e23b1138e 100644
--- a/arch/arm/mach-exynos/include/mach/mmc.h
+++ b/arch/arm/mach-exynos/include/mach/mmc.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_MMC_H_
 #define __ASM_ARCH_MMC_H_
 
+#include <asm/types.h>
 #define S5P_MMC_DEV_OFFSET	0x10000
 
 #define SDHCI_CONTROL2		0x80
diff --git a/arch/arm/mach-exynos/include/mach/power.h b/arch/arm/mach-exynos/include/mach/power.h
index a3d8974dcb5..27960c619b5 100644
--- a/arch/arm/mach-exynos/include/mach/power.h
+++ b/arch/arm/mach-exynos/include/mach/power.h
@@ -8,6 +8,7 @@
 #define __ASM_ARM_ARCH_POWER_H_
 
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 struct exynos4_power {
 	unsigned int	om_stat;
 	unsigned char	res1[0x8];
diff --git a/arch/arm/mach-exynos/include/mach/spl.h b/arch/arm/mach-exynos/include/mach/spl.h
index 9d642461bd6..7675d4dc724 100644
--- a/arch/arm/mach-exynos/include/mach/spl.h
+++ b/arch/arm/mach-exynos/include/mach/spl.h
@@ -11,6 +11,8 @@
 
 #ifndef __ASSEMBLY__
 /* Parameters of early board initialization in SPL */
+#include <compiler.h>
+#include <asm/types.h>
 struct spl_machine_param {
 	/* Add fields as and when required */
 	u32		signature;
diff --git a/arch/arm/mach-exynos/include/mach/sromc.h b/arch/arm/mach-exynos/include/mach/sromc.h
index 15c9ccc723d..81776988961 100644
--- a/arch/arm/mach-exynos/include/mach/sromc.h
+++ b/arch/arm/mach-exynos/include/mach/sromc.h
@@ -24,6 +24,7 @@
 #define SROMC_BC_PMC(x)  (x << 0)  /* normal(1data)page mode configuration */
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct s5p_sromc {
 	unsigned int	bw;
 	unsigned int	bc[4];
diff --git a/arch/arm/mach-exynos/include/mach/sys_proto.h b/arch/arm/mach-exynos/include/mach/sys_proto.h
index 53d53bc6b6d..23c8b643e2c 100644
--- a/arch/arm/mach-exynos/include/mach/sys_proto.h
+++ b/arch/arm/mach-exynos/include/mach/sys_proto.h
@@ -7,6 +7,7 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
+#include <asm/types.h>
 u32 get_device_type(void);
 void invalidate_dcache(u32);
 void l2_cache_disable(void);
diff --git a/arch/arm/mach-exynos/include/mach/tmu.h b/arch/arm/mach-exynos/include/mach/tmu.h
index cad35694f64..b301f17b874 100644
--- a/arch/arm/mach-exynos/include/mach/tmu.h
+++ b/arch/arm/mach-exynos/include/mach/tmu.h
@@ -20,6 +20,7 @@
 #ifndef __ASM_ARCH_TMU_H
 #define __ASM_ARCH_TMU_H
 
+#include <asm/types.h>
 struct exynos5_tmu_reg {
 	u32 triminfo;
 	u32 rsvd1[4];
diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index 7a2fe744527..a94483ce9a0 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -37,6 +37,7 @@
 #include <asm/arch/system.h>
 #include <asm/armv7.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "common_setup.h"
 #include "exynos5_setup.h"
 
diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c
index 5d7738ae5ba..5a818ac2b1e 100644
--- a/arch/arm/mach-exynos/pinmux.c
+++ b/arch/arm/mach-exynos/pinmux.c
@@ -10,6 +10,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/sromc.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static void exynos5_uart_config(int peripheral)
diff --git a/arch/arm/mach-exynos/power.c b/arch/arm/mach-exynos/power.c
index f2a6c00dd62..b36c395bebc 100644
--- a/arch/arm/mach-exynos/power.c
+++ b/arch/arm/mach-exynos/power.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/power.h>
+#include <linux/types.h>
 
 static void exynos4_mipi_phy_control(unsigned int dev_index,
 					unsigned int enable)
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index 810fa348eea..388d50ff64d 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -9,6 +9,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_TARGET_ESPRESSO7420
 /*
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 3ed5d10f1ae..4c19cce1a47 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/cache.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c
index ce49253d0b4..c35720502bc 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -11,6 +11,7 @@
 #include <asm/pl310.h>
 #include <asm/io.h>
 #include <asm/mach-imx/sys_proto.h>
+#include <asm/types.h>
 
 static void enable_ca7_smp(void)
 {
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index a8199497a91..62a9afe8b10 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -15,6 +15,7 @@
 #include <fsl_sec.h>
 #include <asm/arch/clock.h>
 #include <mapmem.h>
+#include <linux/types.h>
 
 /**
 * blob_dek() - Encapsulate the DEK as a blob using CAM's Key
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 9165140e494..882e71aee4c 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <nand.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/devres.h>
@@ -23,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <jffs2/jffs2.h>
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 837bd7e3a45..8988c60ca94 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -25,6 +25,7 @@
 #include <ipu_pixfmt.h>
 #include <thermal.h>
 #include <sata.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_FSL_ESDHC_IMX
 #include <fsl_esdhc_imx.h>
diff --git a/arch/arm/mach-imx/ddrmc-vf610-calibration.c b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
index cd7e95e61d0..fbe3bfd07f2 100644
--- a/arch/arm/mach-imx/ddrmc-vf610-calibration.c
+++ b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/types.h>
 #include <linux/bitmap.h>
 
 #include "ddrmc-vf610-calibration.h"
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index b576b032ec6..73ae2b12a02 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/hab.h>
+#include <linux/types.h>
 
 #define ALIGN_SIZE		0x1000
 #define MX6DQ_PU_IROM_MMU_EN_VAR	0x009024a8
diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c
index 1e1b14c1272..963946769b8 100644
--- a/arch/arm/mach-imx/i2c-mxv7.c
+++ b/arch/arm/mach-imx/i2c-mxv7.c
@@ -15,6 +15,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <watchdog.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 int force_idle_bus(void *priv)
 {
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index f3c370914c6..d779b476ece 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -21,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c
index 9288282dfb0..96a7d8bdcf3 100644
--- a/arch/arm/mach-imx/imx8/clock.c
+++ b/arch/arm/mach-imx/imx8/clock.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/clock.h>
 
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 55a424f6e2f..cab3177e03a 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -5,14 +5,17 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index eee6e529cdc..4ffdc5e5727 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -10,6 +10,7 @@
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/ofnode.h>
 #include <fdt_support.h>
diff --git a/arch/arm/mach-imx/imx8/image.c b/arch/arm/mach-imx/imx8/image.c
index 4258abecd08..d685c9f5e7d 100644
--- a/arch/arm/mach-imx/imx8/image.c
+++ b/arch/arm/mach-imx/imx8/image.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MMC_DEV		0
 #define QSPI_DEV	1
diff --git a/arch/arm/mach-imx/imx8/iomux.c b/arch/arm/mach-imx/imx8/iomux.c
index 0f4f0cac107..4c00622c381 100644
--- a/arch/arm/mach-imx/imx8/iomux.c
+++ b/arch/arm/mach-imx/imx8/iomux.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sci/sci.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/imx8/misc.c b/arch/arm/mach-imx/imx8/misc.c
index e83c0517fca..29566ad7c78 100644
--- a/arch/arm/mach-imx/imx8/misc.c
+++ b/arch/arm/mach-imx/imx8/misc.c
@@ -6,6 +6,7 @@
 #include <asm/mach-imx/sys_proto.h>
 #include <imx_sip.h>
 #include <linux/arm-smccc.h>
+#include <linux/types.h>
 
 int sc_pm_setup_uart(sc_rsrc_t uart_rsrc, sc_pm_clock_rate_t clk_rate)
 {
diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index a5332358ca5..ba254516c2d 100644
--- a/arch/arm/mach-imx/imx8/parse-container.c
+++ b/arch/arm/mach-imx/imx8/parse-container.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SEC_SECURE_RAM_BASE		0x31800000UL
 #define SEC_SECURE_RAM_END_BASE		(SEC_SECURE_RAM_BASE + 0xFFFFUL)
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 086e89b0e5c..cb815395314 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -21,6 +21,7 @@
 #include <asm/arch-imx8/imx8-pins.h>
 #include <asm/arch-imx8/snvs_security_sc.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index ac4d0766dab..20f450c440b 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
@@ -18,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 95a1dbb7180..9b1956cf378 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static struct anamix_pll *ana_pll = (struct anamix_pll *)ANATOP_BASE_ADDR;
 
diff --git a/arch/arm/mach-imx/imx8m/clock_slice.c b/arch/arm/mach-imx/imx8m/clock_slice.c
index 4074e1e4c52..ff8bd35cf9a 100644
--- a/arch/arm/mach-imx/imx8m/clock_slice.c
+++ b/arch/arm/mach-imx/imx8m/clock_slice.c
@@ -6,10 +6,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index f05760771be..9c7e0b1247f 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -6,9 +6,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/imx-regs.h>
@@ -35,6 +37,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index 02fa1d7b62b..e24f430e3c4 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -16,6 +16,7 @@
 #include <linux/compiler.h>
 #include <cpu_func.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int arch_auxiliary_core_up(u32 core_id, ulong addr)
 {
diff --git a/arch/arm/mach-imx/init.c b/arch/arm/mach-imx/init.c
index 693b7244299..be9aac6e221 100644
--- a/arch/arm/mach-imx/init.c
+++ b/arch/arm/mach-imx/init.c
@@ -9,6 +9,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/crm_regs.h>
+#include <asm/types.h>
 
 void init_aips(void)
 {
diff --git a/arch/arm/mach-imx/iomux-v3.c b/arch/arm/mach-imx/iomux-v3.c
index 18131a20f43..219dd98a549 100644
--- a/arch/arm/mach-imx/iomux-v3.c
+++ b/arch/arm/mach-imx/iomux-v3.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/sys_proto.h>
+#include <asm/types.h>
 
 static void *base = (void *)IOMUXC_BASE_ADDR;
 
diff --git a/arch/arm/mach-imx/mac.c b/arch/arm/mach-imx/mac.c
index b23315cf90e..d054f2e37f0 100644
--- a/arch/arm/mach-imx/mac.c
+++ b/arch/arm/mach-imx/mac.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <errno.h>
+#include <linux/types.h>
 
 struct imx_mac_fuse {
 	u32 mac_addr0;
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index e30e87d3aa0..9360a727c47 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/mach-imx/regs-common.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/mmc_env.c b/arch/arm/mach-imx/mmc_env.c
index 9c822f721c6..9ad2cf4dc8f 100644
--- a/arch/arm/mach-imx/mmc_env.c
+++ b/arch/arm/mach-imx/mmc_env.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <linux/types.h>
 
 __weak int board_mmc_get_env_dev(int devno)
 {
diff --git a/arch/arm/mach-imx/mmdc_size.c b/arch/arm/mach-imx/mmdc_size.c
index 1a094726aad..05d71b236bc 100644
--- a/arch/arm/mach-imx/mmdc_size.c
+++ b/arch/arm/mach-imx/mmdc_size.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_MX53)
 #define MEMCTL_BASE	ESDCTL_BASE_ADDR
diff --git a/arch/arm/mach-imx/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c
index adc7dbee7d3..0b4fa84db79 100644
--- a/arch/arm/mach-imx/mx5/clock.c
+++ b/arch/arm/mach-imx/mx5/clock.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/errno.h>
@@ -19,6 +20,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum pll_clocks {
 	PLL1_CLOCK = 0,
diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index c61fcce3eb4..d4431a44fc6 100644
--- a/arch/arm/mach-imx/mx5/soc.c
+++ b/arch/arm/mach-imx/mx5/soc.c
@@ -7,11 +7,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/cache.h>
+#include <asm/types.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 7e066d39b2d..4fdcb7b3f5a 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <div64.h>
 #include <log.h>
 #include <stdbool.h>
@@ -16,6 +17,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 enum pll_clocks {
 	PLL_SYS,	/* System PLL */
diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index d5230d516a1..c02bcabc744 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hang.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-imx/mx6/module_fuse.c b/arch/arm/mach-imx/mx6/module_fuse.c
index c1731a82856..c162b9c528a 100644
--- a/arch/arm/mach-imx/mx6/module_fuse.c
+++ b/arch/arm/mach-imx/mx6/module_fuse.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct fuse_entry_desc mx6_fuse_descs[] = {
 #if defined(CONFIG_MX6ULL)
diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c
index d28d55d4be5..1791bd29466 100644
--- a/arch/arm/mach-imx/mx6/mp.c
+++ b/arch/arm/mach-imx/mx6/mp.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 #define MAX_CPUS 4
 static struct src *src = (struct src *)SRC_BASE_ADDR;
diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c
index 67b8c65963d..d7398f7ace7 100644
--- a/arch/arm/mach-imx/mx6/opos6ul.c
+++ b/arch/arm/mach-imx/mx6/opos6ul.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2018 Armadeus Systems
  */
 
+#include <compiler.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
@@ -13,6 +14,7 @@
 #include <common.h>
 #include <env.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index 51d1cbc24de..99240f02b9c 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
@@ -27,6 +28,7 @@
 #include <imx_thermal.h>
 #include <mmc.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct scu_regs {
 	u32	ctrl;
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index b2d566737a4..6f6dbc9faba 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -20,6 +20,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 struct mxc_ccm_anatop_reg *ccm_anatop = (struct mxc_ccm_anatop_reg *)
 					 ANATOP_BASE_ADDR;
diff --git a/arch/arm/mach-imx/mx7/clock_slice.c b/arch/arm/mach-imx/mx7/clock_slice.c
index c5aea2bffd6..b7ad9e4a406 100644
--- a/arch/arm/mach-imx/mx7/clock_slice.c
+++ b/arch/arm/mach-imx/mx7/clock_slice.c
@@ -8,8 +8,10 @@
 
 #include <common.h>
 #include <div64.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index 214e4043f44..0b93af39977 100644
--- a/arch/arm/mach-imx/mx7/psci-mx7.c
+++ b/arch/arm/mach-imx/mx7/psci-mx7.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/armv7.h>
 #include <asm/gic.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <common.h>
 #include <fsl_wdog.h>
diff --git a/arch/arm/mach-imx/mx7/snvs.c b/arch/arm/mach-imx/mx7/snvs.c
index 359bbbb41c7..acc3356c3be 100644
--- a/arch/arm/mach-imx/mx7/snvs.c
+++ b/arch/arm/mach-imx/mx7/snvs.c
@@ -5,6 +5,7 @@
 
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 #define SNVS_HPCOMR		0x04
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index e97aa8ebe75..652807cee6b 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -4,7 +4,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
@@ -19,6 +21,7 @@
 #include <imx_thermal.h>
 #include <fsl_sec.h>
 #include <asm/setup.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index c7dfa798b45..0b39cf14dba 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/mx7ulp/iomux.c b/arch/arm/mach-imx/mx7ulp/iomux.c
index 05ddeed2a64..24a31d648c4 100644
--- a/arch/arm/mach-imx/mx7ulp/iomux.c
+++ b/arch/arm/mach-imx/mx7ulp/iomux.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
+#include <asm/types.h>
 
 static void *base = (void *)IOMUXC_BASE_ADDR;
 
diff --git a/arch/arm/mach-imx/mx7ulp/pcc.c b/arch/arm/mach-imx/mx7ulp/pcc.c
index 9d06260bdfa..61dfd6b01e0 100644
--- a/arch/arm/mach-imx/mx7ulp/pcc.c
+++ b/arch/arm/mach-imx/mx7ulp/pcc.c
@@ -6,12 +6,14 @@
 #include <common.h>
 #include <div64.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.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 <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index bc837aae33a..c9be289706d 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/pcc.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 79a4ef3cbf8..d4570d64d60 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <log.h>
@@ -18,6 +19,7 @@
 #include <asm/mach-imx/hab.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #define PMC0_BASE_ADDR		0x410a1000
 #define PMC0_CTRL		0x28
diff --git a/arch/arm/mach-imx/rdc-sema.c b/arch/arm/mach-imx/rdc-sema.c
index e683673753e..d184406cd13 100644
--- a/arch/arm/mach-imx/rdc-sema.c
+++ b/arch/arm/mach-imx/rdc-sema.c
@@ -7,6 +7,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/mach-imx/rdc-sema.h>
 #include <asm/arch/imx-rdc.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 /*
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 8e712607044..ba68395217b 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
@@ -22,6 +23,7 @@
 #include <g_dnl.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index 336b3da6264..07b76565392 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -13,6 +13,7 @@
 #include <linux/libfdt.h>
 #include <spl.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/sys_proto.h>
 
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 6dfed365d29..33572b943a7 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/syscounter.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c
index fa1941aec42..569c05fad25 100644
--- a/arch/arm/mach-imx/timer.c
+++ b/arch/arm/mach-imx/timer.c
@@ -14,6 +14,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 /* General purpose timers registers */
 struct mxc_gpt {
diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c
index dae070f0ed6..a15a6871ce4 100644
--- a/arch/arm/mach-ipq40xx/clock-ipq4019.c
+++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct msm_clk_priv {
 	phys_addr_t base;
diff --git a/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c b/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
index 9f73a62d7a1..c18b87d923a 100644
--- a/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
+++ b/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
@@ -18,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinctrl-snapdragon.h"
 
 struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index bda150df9cf..9bed725f8c5 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sysfw-loader.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "common.h"
 #include <dm.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index ef1f3b3209b..f21184b6790 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <image.h>
 #include <init.h>
@@ -18,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "common.h"
 #include <dm.h>
 #include <remoteproc.h>
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index ba344c5bc9d..df0d17f34a1 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -7,6 +7,7 @@
  */
 
 #include <asm/armv7_mpu.h>
+#include <linux/types.h>
 
 struct fwl_data {
 	const char *name;
diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h
index 3c825aa3d1f..62cf760a419 100644
--- a/arch/arm/mach-k3/include/mach/sys_proto.h
+++ b/arch/arm/mach-k3/include/mach/sys_proto.h
@@ -7,6 +7,7 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
+#include <asm/types.h>
 void sdelay(unsigned long loops);
 u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
 		  u32 bound);
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index a835309daf1..00fdae69065 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -16,6 +16,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sysfw-loader.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "common.h"
 #include <asm/arch/sys_proto.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index f4aef0a025b..7655c9a3205 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -16,6 +16,7 @@
 #include <asm/cache.h>
 #include <linux/kernel.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
+#include <linux/types.h>
 #include <mach/spl.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 39a9da1698d..134fec61ab7 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -23,6 +23,7 @@
 #include <dfu.h>
 #include <dm/uclass-internal.h>
 #include <spi_flash.h>
+#include <linux/types.h>
 
 #include <asm/arch/sys_proto.h>
 #include "common.h"
diff --git a/arch/arm/mach-keystone/clock.c b/arch/arm/mach-keystone/clock.c
index 0c59515d2eb..69a7c010dc1 100644
--- a/arch/arm/mach-keystone/clock.c
+++ b/arch/arm/mach-keystone/clock.c
@@ -7,8 +7,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clock_defs.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /* DEV and ARM speed definitions as specified in DEVSPEED register */
diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index 5887a89ff11..42935007dc0 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <mach/mon.h>
diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c
index 99c394cd91d..a589935c222 100644
--- a/arch/arm/mach-keystone/ddr3.c
+++ b/arch/arm/mach-keystone/ddr3.c
@@ -15,6 +15,7 @@
 #include <asm/arch/msmc.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/psc_defs.h>
+#include <asm/types.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 a7aa7f36521..85dcac05d3e 100644
--- a/arch/arm/mach-keystone/ddr3_spd.c
+++ b/arch/arm/mach-keystone/ddr3_spd.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include <i2c.h>
diff --git a/arch/arm/mach-keystone/include/mach/clock_defs.h b/arch/arm/mach-keystone/include/mach/clock_defs.h
index 336b103dc8c..ced9265d0a9 100644
--- a/arch/arm/mach-keystone/include/mach/clock_defs.h
+++ b/arch/arm/mach-keystone/include/mach/clock_defs.h
@@ -10,6 +10,7 @@
 
 #include <asm/arch/hardware.h>
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/mach-keystone/include/mach/ddr3.h b/arch/arm/mach-keystone/include/mach/ddr3.h
index cb28068db7d..4d68f562814 100644
--- a/arch/arm/mach-keystone/include/mach/ddr3.h
+++ b/arch/arm/mach-keystone/include/mach/ddr3.h
@@ -10,6 +10,7 @@
 #define _DDR3_H_
 
 #include <asm/arch/hardware.h>
+#include <asm/types.h>
 
 struct ddr3_phy_config {
 	unsigned int pllcr;
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2g.h b/arch/arm/mach-keystone/include/mach/hardware-k2g.h
index 971c081bb3c..8361d459df9 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2g.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2g.h
@@ -103,6 +103,7 @@
 #define MAX_SYSCLK	4
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 static inline u8 get_sysclk_index(void)
 {
 	u32 dev_stat = __raw_readl(KS2_DEVSTAT);
diff --git a/arch/arm/mach-keystone/include/mach/hardware.h b/arch/arm/mach-keystone/include/mach/hardware.h
index 0c5dc6a7395..4044ae65a0c 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 <asm/types.h>
 #include <linux/bitops.h>
 
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-keystone/include/mach/mon.h b/arch/arm/mach-keystone/include/mach/mon.h
index e1bef216d99..d23d31d6b74 100644
--- a/arch/arm/mach-keystone/include/mach/mon.h
+++ b/arch/arm/mach-keystone/include/mach/mon.h
@@ -9,6 +9,7 @@
 #ifndef _MACH_MON_H_
 #define _MACH_MON_H_
 
+#include <asm/types.h>
 int mon_install(u32 addr, u32 dpsc, u32 freq, u32 bm_addr);
 int mon_power_on(int core_id, void *ep);
 int mon_power_off(int core_id);
diff --git a/arch/arm/mach-keystone/include/mach/msmc.h b/arch/arm/mach-keystone/include/mach/msmc.h
index 3fe09ea5968..d4a9303bd38 100644
--- a/arch/arm/mach-keystone/include/mach/msmc.h
+++ b/arch/arm/mach-keystone/include/mach/msmc.h
@@ -10,6 +10,7 @@
 #define _MSMC_H_
 
 #include <asm/arch/hardware.h>
+#include <asm/types.h>
 
 enum mpax_seg_size {
 	MPAX_SEG_4K = 0x0b,
diff --git a/arch/arm/mach-keystone/include/mach/mux-k2g.h b/arch/arm/mach-keystone/include/mach/mux-k2g.h
index 67d47f81721..8030ccfabb0 100644
--- a/arch/arm/mach-keystone/include/mach/mux-k2g.h
+++ b/arch/arm/mach-keystone/include/mach/mux-k2g.h
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define K2G_PADCFG_REG	(KS2_DEVICE_STATE_CTRL_BASE + 0x1000)
 
diff --git a/arch/arm/mach-keystone/include/mach/psc_defs.h b/arch/arm/mach-keystone/include/mach/psc_defs.h
index 0864b37a531..1966adb0fe3 100644
--- a/arch/arm/mach-keystone/include/mach/psc_defs.h
+++ b/arch/arm/mach-keystone/include/mach/psc_defs.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <asm/arch/hardware.h>
+#include <asm/types.h>
 
 /*
  * FILE PURPOSE: Local Power Sleep Controller definitions
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 880698c5f77..d3386b06d53 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -19,6 +19,7 @@
 #include <asm/arch/psc_defs.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
+#include <linux/types.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 a74c4d995b1..e8b805acb60 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
 #include <asm/arch/hardware.h>
+#include <asm/types.h>
 
 /**
  * cpu_to_bus - swap bytes of the 32-bit data if the device is BE
diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c
index af038dec7ae..f92078964a5 100644
--- a/arch/arm/mach-keystone/mon.c
+++ b/arch/arm/mach-keystone/mon.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <mach/mon.h>
 #include <spl.h>
 asm(".arch_extension sec\n\t");
diff --git a/arch/arm/mach-keystone/msmc.c b/arch/arm/mach-keystone/msmc.c
index f5cadfbf669..ba9e16d0f0c 100644
--- a/arch/arm/mach-keystone/msmc.c
+++ b/arch/arm/mach-keystone/msmc.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/arch/msmc.h>
+#include <asm/types.h>
 
 struct mpax {
 	u32	mpaxl;
diff --git a/arch/arm/mach-keystone/psc.c b/arch/arm/mach-keystone/psc.c
index 6005cbaeca8..f47b08e4bbe 100644
--- a/arch/arm/mach-keystone/psc.c
+++ b/arch/arm/mach-keystone/psc.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-kirkwood/cache.c b/arch/arm/mach-kirkwood/cache.c
index 009b7deeca6..13ee22afdc0 100644
--- a/arch/arm/mach-kirkwood/cache.c
+++ b/arch/arm/mach-kirkwood/cache.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/cpu.h>
 #include <asm/cache.h>
+#include <asm/types.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 48d4327be76..5bdc2d9b56d 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -20,6 +20,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <mvebu_mmc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-kirkwood/include/mach/cpu.h b/arch/arm/mach-kirkwood/include/mach/cpu.h
index ea42182cf9c..ade2ccc8289 100644
--- a/arch/arm/mach-kirkwood/include/mach/cpu.h
+++ b/arch/arm/mach-kirkwood/include/mach/cpu.h
@@ -25,6 +25,7 @@
 #define SYSRST_CNT_1SEC_VAL		(25*1000000)
 #define KW_REG_MPP_OUT_DRV_REG		(KW_MPP_BASE + 0xE0)
 
+#include <asm/types.h>
 enum memory_bank {
 	BANK0,
 	BANK1,
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 4fdad99cade..9525de119cd 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 
 static u32 kirkwood_variant(void)
 {
diff --git a/arch/arm/mach-lpc32xx/clk.c b/arch/arm/mach-lpc32xx/clk.c
index cb2344d79fe..d6060800f16 100644
--- a/arch/arm/mach-lpc32xx/clk.c
+++ b/arch/arm/mach-lpc32xx/clk.c
@@ -9,6 +9,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/clk.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE;
 
diff --git a/arch/arm/mach-lpc32xx/cpu.c b/arch/arm/mach-lpc32xx/cpu.c
index cdc069639d5..65cb6110430 100644
--- a/arch/arm/mach-lpc32xx/cpu.c
+++ b/arch/arm/mach-lpc32xx/cpu.c
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE;
 static struct wdt_regs  *wdt = (struct wdt_regs *)WDT_BASE;
diff --git a/arch/arm/mach-lpc32xx/devices.c b/arch/arm/mach-lpc32xx/devices.c
index 7e7646a2e15..545236b57b6 100644
--- a/arch/arm/mach-lpc32xx/devices.c
+++ b/arch/arm/mach-lpc32xx/devices.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <ns16550.h>
 #include <dm/platform_data/lpc32xx_hsuart.h>
+#include <linux/types.h>
 
 #include <asm/arch/clk.h>
 #include <asm/arch/uart.h>
diff --git a/arch/arm/mach-lpc32xx/dram.c b/arch/arm/mach-lpc32xx/dram.c
index 16022379235..495458af540 100644
--- a/arch/arm/mach-lpc32xx/dram.c
+++ b/arch/arm/mach-lpc32xx/dram.c
@@ -18,6 +18,7 @@
 #include <asm/arch/emc.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.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 90183e3014e..cf5d3de1b58 100644
--- a/arch/arm/mach-lpc32xx/timer.c
+++ b/arch/arm/mach-lpc32xx/timer.c
@@ -11,6 +11,7 @@
 #include <asm/arch/timer.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.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/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index ff07936be34..2ae23c64924 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <linux/types.h>
 
 int print_cpuinfo(void)
 {
diff --git a/arch/arm/mach-mediatek/mt7623/init.c b/arch/arm/mach-mediatek/mt7623/init.c
index fa7a05291bc..78813545eee 100644
--- a/arch/arm/mach-mediatek/mt7623/init.c
+++ b/arch/arm/mach-mediatek/mt7623/init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -11,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <asm/arch/misc.h>
+#include <linux/types.h>
 
 #include "preloader.h"
 
diff --git a/arch/arm/mach-mediatek/mt7623/preloader.h b/arch/arm/mach-mediatek/mt7623/preloader.h
index 2d2c71ad4c4..a696bf12b88 100644
--- a/arch/arm/mach-mediatek/mt7623/preloader.h
+++ b/arch/arm/mach-mediatek/mt7623/preloader.h
@@ -6,6 +6,7 @@
 #ifndef __PRELOADER_H_
 #define __PRELOADER_H_
 
+#include <asm/types.h>
 enum forbidden_mode {
 	F_FACTORY_MODE = 0x0001
 };
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index a643810d245..cddc82d26e4 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -6,6 +6,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
@@ -15,6 +16,7 @@
 #include <asm/arch/misc.h>
 #include <asm/global_data.h>
 #include <asm/sections.h>
+#include <asm/types.h>
 #include <dm/uclass.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index 5a126d317c1..2519e25e1b3 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -22,6 +22,7 @@
 #include <asm/u-boot.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8512-clk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 11fe96f54f3..dec7d8588cd 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -22,6 +22,7 @@
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8516-clk.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index dce53612e46..74ba95d9964 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -22,6 +22,7 @@
 #include <asm/u-boot.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8518-clk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
index 927175c5a31..6b963597687 100644
--- a/arch/arm/mach-mediatek/spl.c
+++ b/arch/arm/mach-mediatek/spl.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <init.h>
 #include <spl.h>
+#include <linux/types.h>
 
 #include "init.h"
 
diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c
index 7e07465d254..3507cda0c44 100644
--- a/arch/arm/mach-meson/board-axg.c
+++ b/arch/arm/mach-meson/board-axg.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
+#include <asm/types.h>
 #include <linux/sizes.h>
 #include <phy.h>
 
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index cdae5f98770..fb92a9c46d6 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
@@ -22,6 +23,7 @@
 #include <asm/armv8/mmu.h>
 #include <asm/unaligned.h>
 #include <efi_loader.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #if CONFIG_IS_ENABLED(FASTBOOT)
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index 250a9617c0d..b40b5641490 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
index b38811fb951..47c1279a548 100644
--- a/arch/arm/mach-meson/board-gx.c
+++ b/arch/arm/mach-meson/board-gx.c
@@ -16,6 +16,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
index 94c523c17fd..226254038de 100644
--- a/arch/arm/mach-meson/board-info.c
+++ b/arch/arm/mach-meson/board-info.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/bitfield.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index 62feaccfce0..76c62ec6f1b 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -24,6 +24,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define FN_GET_SHARE_MEM_INPUT_BASE	0x82000020
 #define FN_GET_SHARE_MEM_OUTPUT_BASE	0x82000021
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 513dcbf9878..640506ece30 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
@@ -20,6 +21,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/armv8/mmu.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index a6b92cf8fb8..67ef64deb67 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -22,6 +22,7 @@
 #include <asm/armv8/mmu.h>
 #include <sort.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Armada 3700 */
 #define MVEBU_GPIO_NB_REG_BASE		(MVEBU_REGISTER(0x13800))
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c
index 529dac90595..81959bb51f0 100644
--- a/arch/arm/mach-mvebu/armada8k/cpu.c
+++ b/arch/arm/mach-mvebu/armada8k/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/armv8/mmu.h>
+#include <linux/types.h>
 
 /* Armada 7k/8k */
 #define MVEBU_RFU_BASE			(MVEBU_REGISTER(0x6f0000))
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index 53c44ede7db..56ef4f3309d 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -5,9 +5,11 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c
index eb84ad9333c..e6af9ff06e7 100644
--- a/arch/arm/mach-mvebu/dram.c
+++ b/arch/arm/mach-mvebu/dram.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #if defined(CONFIG_ARCH_MVEBU)
diff --git a/arch/arm/mach-mvebu/efuse.c b/arch/arm/mach-mvebu/efuse.c
index 8ada3cf93e7..322e2e3db38 100644
--- a/arch/arm/mach-mvebu/efuse.c
+++ b/arch/arm/mach-mvebu/efuse.c
@@ -10,6 +10,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/efuse.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-mvebu/gpio.c b/arch/arm/mach-mvebu/gpio.c
index 1d1e3df8ba9..97e5c11865a 100644
--- a/arch/arm/mach-mvebu/gpio.c
+++ b/arch/arm/mach-mvebu/gpio.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 /*
  * mvebu_config_gpio - GPIO configuration
diff --git a/arch/arm/mach-mvebu/include/mach/cpu.h b/arch/arm/mach-mvebu/include/mach/cpu.h
index c3f8ad85065..a58a0d706de 100644
--- a/arch/arm/mach-mvebu/include/mach/cpu.h
+++ b/arch/arm/mach-mvebu/include/mach/cpu.h
@@ -15,6 +15,7 @@
 #define MVEBU_REG_PCIE_DEVID		(MVEBU_REG_PCIE_BASE + 0x00)
 #define MVEBU_REG_PCIE_REVID		(MVEBU_REG_PCIE_BASE + 0x08)
 
+#include <asm/types.h>
 enum memory_bank {
 	BANK0,
 	BANK1,
diff --git a/arch/arm/mach-mvebu/include/mach/efuse.h b/arch/arm/mach-mvebu/include/mach/efuse.h
index bbc5844d849..c965b62dcd7 100644
--- a/arch/arm/mach-mvebu/include/mach/efuse.h
+++ b/arch/arm/mach-mvebu/include/mach/efuse.h
@@ -7,6 +7,7 @@
 #define _MVEBU_EFUSE_H
 
 #include <common.h>
+#include <asm/types.h>
 
 struct efuse_val {
 	union {
diff --git a/arch/arm/mach-mvebu/mbus.c b/arch/arm/mach-mvebu/mbus.c
index e754f122b1c..cd51e38aed6 100644
--- a/arch/arm/mach-mvebu/mbus.c
+++ b/arch/arm/mach-mvebu/mbus.c
@@ -30,6 +30,8 @@
  * This driver:
  *
  * - Reads out the SDRAM address decoding windows at initialization
+#include <compiler.h>
+#include <linux/types.h>
  *   time, and fills the mbus_dram_info structure with these
  *   informations. The exported function mv_mbus_dram_info() allow
  *   device drivers to get those informations related to the SDRAM
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index adef3331a7c..4768d0537d7 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
index 98354da9b27..b774e62f856 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "high_speed_env_spec.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 e4bec786429..5457868c18e 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
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include "high_speed_env_spec.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
index a8f491b5b41..d4157b1ea72 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include "seq_exec.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.h b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.h
index fe0cb8f75df..71b3a75fb83 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.h
@@ -6,6 +6,7 @@
 #ifndef _SEQ_EXEC_H
 #define _SEQ_EXEC_H
 
+#include <asm/types.h>
 #define NA			0xff
 #define DEFAULT_PARAM		0
 #define MV_BOARD_TCLK_ERROR	0xffffffff
diff --git a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
index 1be86bc4ae1..71a1e61f382 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "seq_exec.h"
 #include "sys_env_lib.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 3ebda4ec684..85f4b90706e 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
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c
index 539d237623a..b4a69374b43 100644
--- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "high_speed_env_spec.h"
 
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 16ebb7a59e5..b97401c26ac 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/types.h>
 
 static u32 get_boot_device(void)
 {
diff --git a/arch/arm/mach-nexell/clock.c b/arch/arm/mach-nexell/clock.c
index cd66248cd65..56e2540fdd8 100644
--- a/arch/arm/mach-nexell/clock.c
+++ b/arch/arm/mach-nexell/clock.c
@@ -6,7 +6,9 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <asm/io.h>
 #include <asm/arch/nexell.h>
diff --git a/arch/arm/mach-nexell/cmd_boot_linux.c b/arch/arm/mach-nexell/cmd_boot_linux.c
index f2dedfe1625..03815a9c09c 100644
--- a/arch/arm/mach-nexell/cmd_boot_linux.c
+++ b/arch/arm/mach-nexell/cmd_boot_linux.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <image.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_CLI_FRAMEWORK)
 
diff --git a/arch/arm/mach-nexell/include/mach/display.h b/arch/arm/mach-nexell/include/mach/display.h
index b167e63a5a4..192341278b1 100644
--- a/arch/arm/mach-nexell/include/mach/display.h
+++ b/arch/arm/mach-nexell/include/mach/display.h
@@ -60,6 +60,7 @@
 #define	DPC_PADCLKSEL_VCLK2		1	/* VCLK2 */
 
 /* display sync info for DPC */
+#include <linux/types.h>
 struct dp_sync_info {
 	int interlace;
 	int h_active_len;
diff --git a/arch/arm/mach-nexell/include/mach/display_dev.h b/arch/arm/mach-nexell/include/mach/display_dev.h
index 77eb614768c..ed5b1a641ee 100644
--- a/arch/arm/mach-nexell/include/mach/display_dev.h
+++ b/arch/arm/mach-nexell/include/mach/display_dev.h
@@ -14,6 +14,7 @@
 #include <lcd.h>
 #endif
 
+#include <linux/types.h>
 struct nx_display_dev {
 #if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
 	GraphicDevice graphic_device;
diff --git a/arch/arm/mach-nexell/include/mach/mipi_display.h b/arch/arm/mach-nexell/include/mach/mipi_display.h
index f3fdec64647..a1cfde27388 100644
--- a/arch/arm/mach-nexell/include/mach/mipi_display.h
+++ b/arch/arm/mach-nexell/include/mach/mipi_display.h
@@ -12,6 +12,7 @@
 #define MIPI_DISPLAY_H
 
 /* MIPI DSI Processor-to-Peripheral transaction types */
+#include <linux/types.h>
 enum {
 	MIPI_DSI_V_SYNC_START				= 0x01,
 	MIPI_DSI_V_SYNC_END				= 0x11,
diff --git a/arch/arm/mach-nexell/include/mach/reset.h b/arch/arm/mach-nexell/include/mach/reset.h
index e1301d4e53d..a533e42fa03 100644
--- a/arch/arm/mach-nexell/include/mach/reset.h
+++ b/arch/arm/mach-nexell/include/mach/reset.h
@@ -7,6 +7,7 @@
 #ifndef __NEXELL_RESET__
 #define __NEXELL_RESET__
 
+#include <asm/types.h>
 #define NUMBER_OF_RESET_MODULE_PIN      69
 
 enum rstcon {
diff --git a/arch/arm/mach-nexell/include/mach/sec_reg.h b/arch/arm/mach-nexell/include/mach/sec_reg.h
index e3ae5ac1bb4..f8396c460fd 100644
--- a/arch/arm/mach-nexell/include/mach/sec_reg.h
+++ b/arch/arm/mach-nexell/include/mach/sec_reg.h
@@ -4,6 +4,7 @@
  * Youngbok, Park <park at nexell.co.kr>
  */
 
+#include <compiler.h>
 #define NEXELL_L2C_SEC_ID	0
 #define NEXELL_MALI_SEC_ID	2
 #define NEXELL_MIPI_SEC_ID	4
diff --git a/arch/arm/mach-nexell/include/mach/tieoff.h b/arch/arm/mach-nexell/include/mach/tieoff.h
index 70e9652b6dc..598ffdd1801 100644
--- a/arch/arm/mach-nexell/include/mach/tieoff.h
+++ b/arch/arm/mach-nexell/include/mach/tieoff.h
@@ -7,6 +7,7 @@
 #ifndef _NEXELL_TIEOFF_H
 #define _NEXELL_TIEOFF_H
 
+#include <asm/types.h>
 void nx_tieoff_set(u32 tieoff_index, u32 tieoff_value);
 u32 nx_tieoff_get(u32 tieoff_index);
 
diff --git a/arch/arm/mach-nexell/nx_sec_reg.c b/arch/arm/mach-nexell/nx_sec_reg.c
index 3d3dd9fd8b6..09d2eed48ae 100644
--- a/arch/arm/mach-nexell/nx_sec_reg.c
+++ b/arch/arm/mach-nexell/nx_sec_reg.c
@@ -4,6 +4,7 @@
  * Youngbok, Park <park at nexell.co.kr>
  */
 
+#include <compiler.h>
 #include <linux/types.h>
 #include <asm/io.h>
 #include <asm/arch/nexell.h>
diff --git a/arch/arm/mach-nexell/reset.c b/arch/arm/mach-nexell/reset.c
index 1f732a3d373..97155d8ffd0 100644
--- a/arch/arm/mach-nexell/reset.c
+++ b/arch/arm/mach-nexell/reset.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/nexell.h>
 #include <asm/arch/reset.h>
+#include <asm/types.h>
 
 struct	nx_rstcon_registerset {
 	u32	regrst[(NUMBER_OF_RESET_MODULE_PIN + 31) >> 5];
diff --git a/arch/arm/mach-nexell/tieoff.c b/arch/arm/mach-nexell/tieoff.c
index 5a4744c296a..2c2db9f6ce6 100644
--- a/arch/arm/mach-nexell/tieoff.c
+++ b/arch/arm/mach-nexell/tieoff.c
@@ -5,12 +5,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/arch/nexell.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/reset.h>
 #include <asm/arch/nx_gpio.h>
 #include <asm/arch/tieoff.h>
 #include <asm/arch/sec_reg.h>
+#include <asm/types.h>
 
 #define	NX_PIN_FN_SIZE	4
 #define TIEOFF_REG_NUM 33
diff --git a/arch/arm/mach-nexell/timer.c b/arch/arm/mach-nexell/timer.c
index 2f98bd7fa4a..1119ce74645 100644
--- a/arch/arm/mach-nexell/timer.c
+++ b/arch/arm/mach-nexell/timer.c
@@ -5,8 +5,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/arch/nexell.h>
diff --git a/arch/arm/mach-omap2/abb.c b/arch/arm/mach-omap2/abb.c
index 24775bdc41c..c3487f83b75 100644
--- a/arch/arm/mach-omap2/abb.c
+++ b/arch/arm/mach-omap2/abb.c
@@ -9,11 +9,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/omap_common.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 0b0372e22ca..ce399663191 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <debug_uart.h>
 #include <errno.h>
@@ -38,6 +39,7 @@
 #include <linux/errno.h>
 #include <linux/compiler.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
diff --git a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
index b2493d8179b..ac97bfa69c0 100644
--- a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
+++ b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/arch/clk_synthesizer.h>
 #include <i2c.h>
+#include <asm/types.h>
 
 /**
  * clk_synthesizer_reg_read - Read register from synthesizer.
diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
index 4339817b556..d665da8856f 100644
--- a/arch/arm/mach-omap2/am33xx/clock.c
+++ b/arch/arm/mach-omap2/am33xx/clock.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
  */
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 static void setup_post_dividers(const struct dpll_regs *dpll_regs,
 			 const struct dpll_params *params)
diff --git a/arch/arm/mach-omap2/am33xx/clock_am33xx.c b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
index b5136f8f46c..5a483a9e3d0 100644
--- a/arch/arm/mach-omap2/am33xx/clock_am33xx.c
+++ b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
@@ -8,12 +8,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define OSC	(V_OSCK/1000000)
 
diff --git a/arch/arm/mach-omap2/am33xx/clock_am43xx.c b/arch/arm/mach-omap2/am33xx/clock_am43xx.c
index b98bb9989c0..ef4b79f272d 100644
--- a/arch/arm/mach-omap2/am33xx/clock_am43xx.c
+++ b/arch/arm/mach-omap2/am33xx/clock_am43xx.c
@@ -14,6 +14,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 struct cm_perpll *const cmper = (struct cm_perpll *)CM_PER;
 struct cm_wkuppll *const cmwkup = (struct cm_wkuppll *)CM_WKUP;
diff --git a/arch/arm/mach-omap2/am33xx/clock_ti814x.c b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
index 27abaff48fc..8e2c224bf7e 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 <asm/types.h>
 #include <linux/delay.h>
 
 /* PRCM */
diff --git a/arch/arm/mach-omap2/am33xx/clock_ti816x.c b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
index ec4cc753812..c551a5d7cc6 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 <asm/types.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 4caa2d62ab2..cb30d65bca7 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <asm/emif.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /**
diff --git a/arch/arm/mach-omap2/am33xx/emif4.c b/arch/arm/mach-omap2/am33xx/emif4.c
index a5fdb0433dc..1d5fb534088 100644
--- a/arch/arm/mach-omap2/am33xx/emif4.c
+++ b/arch/arm/mach-omap2/am33xx/emif4.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/ddr_defs.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-omap2/am33xx/mux.c b/arch/arm/mach-omap2/am33xx/mux.c
index aad3ec85569..06534cb1db4 100644
--- a/arch/arm/mach-omap2/am33xx/mux.c
+++ b/arch/arm/mach-omap2/am33xx/mux.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-omap2/am33xx/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
index 86078f856ed..ba81baa914c 100644
--- a/arch/arm/mach-omap2/am33xx/sys_info.c
+++ b/arch/arm/mach-omap2/am33xx/sys_info.c
@@ -19,6 +19,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/tps65910.h>
 #include <linux/compiler.h>
 
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index b8fba785a96..8049f786c3f 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 <compiler.h>
 #include <log.h>
 #include <spl.h>
 #include <asm/global_data.h>
@@ -19,6 +20,7 @@
 #include <watchdog.h>
 #include <scsi.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
index a151358f6e0..bf31d893c57 100644
--- a/arch/arm/mach-omap2/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
@@ -13,6 +13,7 @@
  *	Rajendra Nayak <rnayak at ti.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <i2c.h>
 #include <init.h>
@@ -22,6 +23,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/utils.h>
 #include <asm/omap_gpio.h>
 #include <asm/emif.h>
diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index 15c13463f90..bfd2c158486 100644
--- a/arch/arm/mach-omap2/emif-common.c
+++ b/arch/arm/mach-omap2/emif-common.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
@@ -20,6 +21,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/omap_common.h>
 #include <asm/omap_sec_common.h>
+#include <asm/types.h>
 #include <asm/utils.h>
 #include <linux/compiler.h>
 #include <asm/ti-common/ti-edma3.h>
diff --git a/arch/arm/mach-omap2/fdt-common.c b/arch/arm/mach-omap2/fdt-common.c
index e1d3a72ec6d..4efccd0d7fc 100644
--- a/arch/arm/mach-omap2/fdt-common.c
+++ b/arch/arm/mach-omap2/fdt-common.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.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 c7e912c2da0..d3fb5865022 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -11,6 +11,7 @@
  *	Steve Sakoman	<steve at sakoman.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <fdtdec.h>
 #include <init.h>
@@ -25,6 +26,7 @@
 #include <linux/compiler.h>
 #include <asm/system.h>
 #include <dm/root.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-omap2/mem-common.c b/arch/arm/mach-omap2/mem-common.c
index 50d5f3e9eba..2a15692f681 100644
--- a/arch/arm/mach-omap2/mem-common.c
+++ b/arch/arm/mach-omap2/mem-common.c
@@ -18,6 +18,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
 #include <command.h>
+#include <asm/types.h>
 #include <linux/mtd/omap_gpmc.h>
 #include <jffs2/load_kernel.h>
 
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index 5034404801a..a07e138b110 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.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 23b55d8d705..902caa1b6b9 100644
--- a/arch/arm/mach-omap2/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
@@ -15,6 +15,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
+#include <asm/types.h>
 
 void am35x_musb_reset(struct udevice *dev)
 {
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 272a4c9ed95..7ab738f9cb2 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -17,6 +17,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <init.h>
 #include <spl.h>
@@ -31,6 +32,7 @@
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Declarations */
 extern omap3_sysinfo sysinfo;
diff --git a/arch/arm/mach-omap2/omap3/boot.c b/arch/arm/mach-omap2/omap3/boot.c
index ea26115b711..5544b87894a 100644
--- a/arch/arm/mach-omap2/omap3/boot.c
+++ b/arch/arm/mach-omap2/omap3/boot.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
+#include <asm/types.h>
 
 static u32 boot_devices[] = {
 	BOOT_DEVICE_ONENAND,
diff --git a/arch/arm/mach-omap2/omap3/clock.c b/arch/arm/mach-omap2/omap3/clock.c
index 71f73492c6c..2cb751269cc 100644
--- a/arch/arm/mach-omap2/omap3/clock.c
+++ b/arch/arm/mach-omap2/omap3/clock.c
@@ -18,6 +18,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
 #include <command.h>
+#include <asm/types.h>
 
 /******************************************************************************
  * get_sys_clk_speed() - determine reference oscillator speed
diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
index 4c102dadf42..d96acfed2e5 100644
--- a/arch/arm/mach-omap2/omap3/emac.c
+++ b/arch/arm/mach-omap2/omap3/emac.c
@@ -10,6 +10,7 @@
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 /*
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index dd99aeb63bd..6c18a77c100 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -16,6 +16,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/emif4.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 78456f03f98..f24a5525aa5 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -27,6 +27,7 @@
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c
index 5ed2c6bdeee..526d3d60dba 100644
--- a/arch/arm/mach-omap2/omap3/sys_info.c
+++ b/arch/arm/mach-omap2/omap3/sys_info.c
@@ -12,12 +12,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>	/* get mem tables */
 #include <asm/arch/sys_proto.h>
 #include <asm/bootm.h>
 #include <asm/omap_common.h>
+#include <asm/types.h>
 
 #include <i2c.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/mach-omap2/omap4/boot.c b/arch/arm/mach-omap2/omap4/boot.c
index 90b5380ae39..95f57366b52 100644
--- a/arch/arm/mach-omap2/omap4/boot.c
+++ b/arch/arm/mach-omap2/omap4/boot.c
@@ -10,6 +10,7 @@
 #include <asm/omap_common.h>
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
+#include <asm/types.h>
 
 static u32 boot_devices[] = {
 	BOOT_DEVICE_MMC2,
diff --git a/arch/arm/mach-omap2/omap4/emif.c b/arch/arm/mach-omap2/omap4/emif.c
index 35a51645be7..6fe3fa4e40a 100644
--- a/arch/arm/mach-omap2/omap4/emif.c
+++ b/arch/arm/mach-omap2/omap4/emif.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/utils.h>
 
 #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
diff --git a/arch/arm/mach-omap2/omap4/hw_data.c b/arch/arm/mach-omap2/omap4/hw_data.c
index 5f15e086c64..91608d9fed9 100644
--- a/arch/arm/mach-omap2/omap4/hw_data.c
+++ b/arch/arm/mach-omap2/omap4/hw_data.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clock.h>
 #include <asm/omap_gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 struct prcm_regs const **prcm =
 			(struct prcm_regs const **) OMAP_SRAM_SCRATCH_PRCM_PTR;
diff --git a/arch/arm/mach-omap2/omap4/hwinit.c b/arch/arm/mach-omap2/omap4/hwinit.c
index 27dfa9142dc..efb4d6a8048 100644
--- a/arch/arm/mach-omap2/omap4/hwinit.c
+++ b/arch/arm/mach-omap2/omap4/hwinit.c
@@ -19,6 +19,7 @@
 #include <asm/emif.h>
 #include <asm/arch/gpio.h>
 #include <asm/omap_common.h>
+#include <linux/types.h>
 
 u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
 
diff --git a/arch/arm/mach-omap2/omap4/sdram_elpida.c b/arch/arm/mach-omap2/omap4/sdram_elpida.c
index 2a18cf0215d..a775494e407 100644
--- a/arch/arm/mach-omap2/omap4/sdram_elpida.c
+++ b/arch/arm/mach-omap2/omap4/sdram_elpida.c
@@ -10,8 +10,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 
 /*
  * This file provides details of the LPDDR2 SDRAM parts used on OMAP4430
diff --git a/arch/arm/mach-omap2/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c
index 2f9f8e65d03..730ab832db5 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 <asm/types.h>
 #include <linux/bitops.h>
 
 /*
diff --git a/arch/arm/mach-omap2/omap5/boot.c b/arch/arm/mach-omap2/omap5/boot.c
index 15d6836c6ea..bbc9a90fe69 100644
--- a/arch/arm/mach-omap2/omap5/boot.c
+++ b/arch/arm/mach-omap2/omap5/boot.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/omap_common.h>
 #include <spl.h>
+#include <asm/types.h>
 
 static u32 boot_devices[] = {
 #if defined(CONFIG_DRA7XX)
diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
index c5d51aabfc9..509f6617c59 100644
--- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.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 2de36b6feca..5348921c060 100644
--- a/arch/arm/mach-omap2/omap5/emif.c
+++ b/arch/arm/mach-omap2/omap5/emif.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/utils.h>
 
 #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c
index af9717801e4..c1321f6dc1f 100644
--- a/arch/arm/mach-omap2/omap5/fdt.c
+++ b/arch/arm/mach-omap2/omap5/fdt.c
@@ -12,6 +12,7 @@
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <malloc.h>
+#include <linux/types.h>
 
 #include <asm/omap_common.h>
 #include <asm/arch-omap5/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c
index d9c447c0e8d..171155ddef6 100644
--- a/arch/arm/mach-omap2/omap5/hw_data.c
+++ b/arch/arm/mach-omap2/omap5/hw_data.c
@@ -9,6 +9,7 @@
  * Sricharan R <r.sricharan at ti.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <palmas.h>
 #include <stdio.h>
 #include <asm/arch/omap.h>
@@ -18,6 +19,7 @@
 #include <asm/omap_gpio.h>
 #include <asm/io.h>
 #include <asm/emif.h>
+#include <asm/types.h>
 
 struct prcm_regs const **prcm =
 			(struct prcm_regs const **) OMAP_SRAM_SCRATCH_PRCM_PTR;
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index 47ac8656bfe..9773bc29e7d 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -12,6 +12,7 @@
  *	Sricharan	<r.sricharan at ti.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <palmas.h>
 #include <asm/armv7.h>
@@ -24,6 +25,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/emif.h>
 #include <asm/omap_common.h>
+#include <linux/types.h>
 
 u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
 
diff --git a/arch/arm/mach-omap2/omap5/prcm-regs.c b/arch/arm/mach-omap2/omap5/prcm-regs.c
index b5baebc0692..3e8086dddb1 100644
--- a/arch/arm/mach-omap2/omap5/prcm-regs.c
+++ b/arch/arm/mach-omap2/omap5/prcm-regs.c
@@ -11,6 +11,7 @@
 
 #include <asm/omap_common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 struct prcm_regs const omap5_es1_prcm = {
 	/* cm1.ckgen */
diff --git a/arch/arm/mach-omap2/omap5/sdram.c b/arch/arm/mach-omap2/omap5/sdram.c
index f6c8eb9f1bd..4306ea3a63f 100644
--- a/arch/arm/mach-omap2/omap5/sdram.c
+++ b/arch/arm/mach-omap2/omap5/sdram.c
@@ -11,9 +11,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /*
diff --git a/arch/arm/mach-omap2/pipe3-phy.c b/arch/arm/mach-omap2/pipe3-phy.c
index fb64961db4b..f6e50f92e9f 100644
--- a/arch/arm/mach-omap2/pipe3-phy.c
+++ b/arch/arm/mach-omap2/pipe3-phy.c
@@ -7,11 +7,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <sata.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-omap2/pipe3-phy.h b/arch/arm/mach-omap2/pipe3-phy.h
index 182bdcd4c81..3999d7b60f5 100644
--- a/arch/arm/mach-omap2/pipe3-phy.h
+++ b/arch/arm/mach-omap2/pipe3-phy.h
@@ -9,6 +9,8 @@
 #ifndef __OMAP_PIPE3_PHY_H
 #define __OMAP_PIPE3_PHY_H
 
+#include <compiler.h>
+#include <asm/types.h>
 struct pipe3_dpll_params {
 	u16     m;
 	u8      n;
diff --git a/arch/arm/mach-omap2/reset.c b/arch/arm/mach-omap2/reset.c
index 2bbd5fcb9b8..194e01163aa 100644
--- a/arch/arm/mach-omap2/reset.c
+++ b/arch/arm/mach-omap2/reset.c
@@ -8,10 +8,12 @@
  *
  * Sricharan R <r.sricharan at ti.com>
  */
+#include <compiler.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 #include <linux/compiler.h>
 
 void __weak reset_cpu(unsigned long ignored)
diff --git a/arch/arm/mach-omap2/sata.c b/arch/arm/mach-omap2/sata.c
index 4672dc534c5..636cfb42ace 100644
--- a/arch/arm/mach-omap2/sata.c
+++ b/arch/arm/mach-omap2/sata.c
@@ -8,11 +8,13 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <compiler.h>
 #include <scsi.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sata.h>
 #include <sata.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include "pipe3-phy.h"
 
 static struct pipe3_dpll_map dpll_map_sata[] = {
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 8dcaa1ac6c9..d0cf68e30be 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/sys_proto.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-omap2/sysinfo-common.c b/arch/arm/mach-omap2/sysinfo-common.c
index 49bc3a634fb..6bce3a1c7ce 100644
--- a/arch/arm/mach-omap2/sysinfo-common.c
+++ b/arch/arm/mach-omap2/sysinfo-common.c
@@ -9,6 +9,7 @@
 #include <asm/arch/omap.h>
 #include <asm/io.h>
 #include <asm/omap_common.h>
+#include <asm/types.h>
 
 /**
  * Tell if device is GP/HS/EMU/TST.
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 82b10f6b248..c5565a741eb 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -23,6 +23,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 4ee409521ef..be082cf2c97 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -4,6 +4,7 @@
  * Aneesh V <aneesh at ti.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <part.h>
 #include <stdio.h>
@@ -11,6 +12,7 @@
 #include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/omap_common.h>
+#include <asm/types.h>
 #include <linux/printk.h>
 
 static void do_cancel_out(u32 *num, u32 *den, u32 factor)
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 5888bc86752..b72c7823716 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -19,6 +19,7 @@
 #include <asm/omap_common.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
+#include <asm/types.h>
 
 /* Register defines and masks for VC IP Block */
 /* PRM_VC_CFG_I2C_MODE */
diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 81f3bd37ea3..f050a30d983 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -17,6 +17,7 @@
 #include <vsprintf.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <u-boot/md5.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-orion5x/dram.c b/arch/arm/mach-orion5x/dram.c
index 5e6f51de5c4..7d0deed662b 100644
--- a/arch/arm/mach-orion5x/dram.c
+++ b/arch/arm/mach-orion5x/dram.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <asm/arch/cpu.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-orion5x/include/mach/cpu.h b/arch/arm/mach-orion5x/include/mach/cpu.h
index c3ff89669e4..6118f42313f 100644
--- a/arch/arm/mach-orion5x/include/mach/cpu.h
+++ b/arch/arm/mach-orion5x/include/mach/cpu.h
@@ -21,6 +21,7 @@
 #define ORION5XGBE_PORT_SERIAL_CONTROL1_REG(_x)	\
 		((_x ? ORION5X_EGIGA0_BASE : ORION5X_EGIGA1_BASE) + 0x44c)
 
+#include <asm/types.h>
 enum memory_bank {
 	BANK0,
 	BANK1,
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index 0adf3dcc648..3f9f0f9b625 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.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 34b05223c0c..838cc2ff573 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/psci.h>
+#include <linux/types.h>
 
 #define DMM_INTERLEAVE_PER_CH_CFG	0xe0290028
 
diff --git a/arch/arm/mach-rmobile/cpu_info-r8a7740.c b/arch/arm/mach-rmobile/cpu_info-r8a7740.c
index dcbe25f37ab..16a5a8ae29a 100644
--- a/arch/arm/mach-rmobile/cpu_info-r8a7740.c
+++ b/arch/arm/mach-rmobile/cpu_info-r8a7740.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 u32 rmobile_get_cpu_type(void)
 {
diff --git a/arch/arm/mach-rmobile/cpu_info-rcar.c b/arch/arm/mach-rmobile/cpu_info-rcar.c
index ce9312f9d82..724d3c67d59 100644
--- a/arch/arm/mach-rmobile/cpu_info-rcar.c
+++ b/arch/arm/mach-rmobile/cpu_info-rcar.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define PRR_MASK		0x7fff
 #define R8A7796_REV_1_0		0x5200
diff --git a/arch/arm/mach-rmobile/cpu_info-sh73a0.c b/arch/arm/mach-rmobile/cpu_info-sh73a0.c
index 0c7ee8acf5a..7f01201629b 100644
--- a/arch/arm/mach-rmobile/cpu_info-sh73a0.c
+++ b/arch/arm/mach-rmobile/cpu_info-sh73a0.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 u32 rmobile_get_cpu_type(void)
 {
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 1380dc61eb2..44e39e248b2 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <env.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-rmobile/include/mach/ehci-rmobile.h b/arch/arm/mach-rmobile/include/mach/ehci-rmobile.h
index ca8c5f37063..641872cbbcd 100644
--- a/arch/arm/mach-rmobile/include/mach/ehci-rmobile.h
+++ b/arch/arm/mach-rmobile/include/mach/ehci-rmobile.h
@@ -8,6 +8,7 @@
 #define __EHCI_RMOBILE_H__
 
 /* Register offset */
+#include <asm/types.h>
 #define OHCI_OFFSET	0x00
 #define OHCI_SIZE	0x1000
 #define EHCI_OFFSET	0x1000
diff --git a/arch/arm/mach-rmobile/include/mach/rcar-mstp.h b/arch/arm/mach-rmobile/include/mach/rcar-mstp.h
index f2f8ce95992..f408b1e76e3 100644
--- a/arch/arm/mach-rmobile/include/mach/rcar-mstp.h
+++ b/arch/arm/mach-rmobile/include/mach/rcar-mstp.h
@@ -9,6 +9,7 @@
 #ifndef __ASM_ARCH_RCAR_MSTP_H
 #define __ASM_ARCH_RCAR_MSTP_H
 
+#include <asm/types.h>
 #define mstp_setbits(type, addr, saddr, set) \
 		out_##type((saddr), in_##type(addr) | (set))
 #define mstp_clrbits(type, addr, saddr, clear) \
diff --git a/arch/arm/mach-rmobile/include/mach/rmobile.h b/arch/arm/mach-rmobile/include/mach/rmobile.h
index a50249dc963..e41004eb437 100644
--- a/arch/arm/mach-rmobile/include/mach/rmobile.h
+++ b/arch/arm/mach-rmobile/include/mach/rmobile.h
@@ -41,6 +41,7 @@
 #define RMOBILE_CPU_TYPE_R8A77995	0x58
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 u32 rmobile_get_cpu_type(void);
 u32 rmobile_get_cpu_rev_integer(void);
 u32 rmobile_get_cpu_rev_fraction(void);
diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
index ba06535e4c2..d911dbea51f 100644
--- a/arch/arm/mach-rmobile/timer.c
+++ b/arch/arm/mach-rmobile/timer.c
@@ -12,6 +12,7 @@
 #include <asm/arch-armv7/globaltimer.h>
 #include <asm/arch/rmobile.h>
 #include <linux/delay.h>
+#include <linux/types.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 e6e6fc5fbe4..4d4978f6bb6 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
@@ -19,6 +20,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/periph.h>
 #include <asm/arch-rockchip/misc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index 69e64fb39c3..3c52b94e0d0 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <adc.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <stdbool.h>
diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index 24ba39537cd..3a557e0a101 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/setjmp.h>
 #include <asm/system.h>
+#include <asm/types.h>
 
 /*
  * Force the jmp_buf to the data-section, as .bss will not be valid
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 82a106e786e..17a0579bddc 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <dm/uclass-internal.h>
 #include <misc.h>
 #include <linux/string.h>
diff --git a/arch/arm/mach-rockchip/px30-board-tpl.c b/arch/arm/mach-rockchip/px30-board-tpl.c
index 085e6506201..bb9aac92e5b 100644
--- a/arch/arm/mach-rockchip/px30-board-tpl.c
+++ b/arch/arm/mach-rockchip/px30-board-tpl.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/sdram_px30.h>
+#include <linux/types.h>
 
 #define TIMER_LOAD_COUNT0	0x00
 #define TIMER_LOAD_COUNT1	0x04
diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c
index f11424d105b..228af5b1115 100644
--- a/arch/arm/mach-rockchip/px30/px30.c
+++ b/arch/arm/mach-rockchip/px30/px30.c
@@ -13,6 +13,7 @@
 #include <asm/arch-rockchip/uart.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_px30.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dt-bindings/clock/px30-cru.h>
 
diff --git a/arch/arm/mach-rockchip/px30/syscon_px30.c b/arch/arm/mach-rockchip/px30/syscon_px30.c
index 4672bdbf009..ce387f007e8 100644
--- a/arch/arm/mach-rockchip/px30/syscon_px30.c
+++ b/arch/arm/mach-rockchip/px30/syscon_px30.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 static const struct udevice_id px30_syscon_ids[] = {
 	{ .compatible = "rockchip,px30-pmu", .data = ROCKCHIP_SYSCON_PMU },
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
index 964e981b863..1fbbab9a71c 100644
--- a/arch/arm/mach-rockchip/rk3036-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/sdram_rk3036.h>
+#include <linux/types.h>
 
 #define TIMER_LOAD_COUNT_L	0x00
 #define TIMER_LOAD_COUNT_H	0x04
diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
index 6ae254e99af..38f6f2cba37 100644
--- a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
@@ -12,6 +12,7 @@
 #include <asm/arch-rockchip/sdram_rk3036.h>
 #include <asm/arch-rockchip/uart.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 /*
  * we can not fit the code to access the device tree in SPL
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 1a6750d39b1..b3e2b5400e5 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
diff --git a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
index ea7d7b5b1ac..81677f9485a 100644
--- a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 static const struct udevice_id rk3188_syscon_ids[] = {
 	{ .compatible = "rockchip,rk3188-noc", .data = ROCKCHIP_SYSCON_NOC },
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 1589ab1b2c7..37d9fa02037 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <clk.h>
@@ -25,6 +26,7 @@
 #include <asm/u-boot.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
index e3da0a01947..c4142ef75ad 100644
--- a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 static const struct udevice_id rk3288_syscon_ids[] = {
 	{ .compatible = "rockchip,rk3288-noc", .data = ROCKCHIP_SYSCON_NOC },
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index c50da1365d5..69b1df1146c 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -3,6 +3,7 @@
  *Copyright (c) 2018 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <malloc.h>
 #include <stdio.h>
@@ -12,6 +13,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/gpio.h>
 #include <debug_uart.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index fef8bfc476a..be91ea1e63a 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -18,6 +18,7 @@
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.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 cba0dda3e80..2b02387cc4a 100644
--- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 static const struct udevice_id rk3368_syscon_ids[] = {
 	{ .compatible = "rockchip,rk3368-grf",
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index f2ad3f5ec13..7d93be2e4c0 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdt_support.h>
 #include <init.h>
 #include <log.h>
@@ -18,6 +19,7 @@
 #include <asm/arch-rockchip/gpio.h>
 #include <asm/arch-rockchip/grf_rk3399.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
index 690cbe7f278..296998a11bc 100644
--- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 static const struct udevice_id rk3399_syscon_ids[] = {
 	{ .compatible = "rockchip,rk3399-grf", .data = ROCKCHIP_SYSCON_GRF },
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index d9cf3255914..15b521f8918 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -14,6 +14,7 @@
 #include <asm/u-boot.h>
 #include <dm/uclass-internal.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 57ea84a9346..f67fbe23a3b 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <mmc.h>
 #include <spl.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 345e61058d7..4589c14b904 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
@@ -19,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index df052b82f2f..37f7c493a23 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
@@ -16,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #define TIMER_LOAD_COUNT_L	0x00
 #define TIMER_LOAD_COUNT_H	0x04
diff --git a/arch/arm/mach-s5pc1xx/clock.c b/arch/arm/mach-s5pc1xx/clock.c
index e8809aa8ce2..28e8130ed6a 100644
--- a/arch/arm/mach-s5pc1xx/clock.c
+++ b/arch/arm/mach-s5pc1xx/clock.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clk.h>
+#include <linux/types.h>
 
 #define CLK_M	0
 #define CLK_D	1
diff --git a/arch/arm/mach-s5pc1xx/include/mach/gpio.h b/arch/arm/mach-s5pc1xx/include/mach/gpio.h
index c8dfbdd642a..93e1f0c5320 100644
--- a/arch/arm/mach-s5pc1xx/include/mach/gpio.h
+++ b/arch/arm/mach-s5pc1xx/include/mach/gpio.h
@@ -8,6 +8,7 @@
 #define __ASM_ARCH_GPIO_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct s5p_gpio_bank {
 	unsigned int	con;
 	unsigned int	dat;
diff --git a/arch/arm/mach-s5pc1xx/include/mach/mmc.h b/arch/arm/mach-s5pc1xx/include/mach/mmc.h
index 70787908600..e32a3c9f9d8 100644
--- a/arch/arm/mach-s5pc1xx/include/mach/mmc.h
+++ b/arch/arm/mach-s5pc1xx/include/mach/mmc.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_ARCH_MMC_H_
 #define __ASM_ARCH_MMC_H_
 
+#include <asm/types.h>
 #define S5P_MMC_DEV_OFFSET	0x100000
 
 #define SDHCI_CONTROL2		0x80
diff --git a/arch/arm/mach-s5pc1xx/include/mach/sromc.h b/arch/arm/mach-s5pc1xx/include/mach/sromc.h
index 45de4a799d3..cd484edb4ca 100644
--- a/arch/arm/mach-s5pc1xx/include/mach/sromc.h
+++ b/arch/arm/mach-s5pc1xx/include/mach/sromc.h
@@ -27,6 +27,7 @@
 #define SMC_BC_PMC(x)  (x << 0)  /* normal(1data)page mode configuration */
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 struct s5p_sromc {
 	unsigned int	bw;
 	unsigned int	bc[6];
diff --git a/arch/arm/mach-s5pc1xx/include/mach/sys_proto.h b/arch/arm/mach-s5pc1xx/include/mach/sys_proto.h
index 89de400043a..d3f6735c8e7 100644
--- a/arch/arm/mach-s5pc1xx/include/mach/sys_proto.h
+++ b/arch/arm/mach-s5pc1xx/include/mach/sys_proto.h
@@ -7,6 +7,7 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
+#include <asm/types.h>
 u32 get_device_type(void);
 
 #endif
diff --git a/arch/arm/mach-snapdragon/clock-apq8016.c b/arch/arm/mach-snapdragon/clock-apq8016.c
index 6e4a0ccb90a..8a5e0d5f557 100644
--- a/arch/arm/mach-snapdragon/clock-apq8016.c
+++ b/arch/arm/mach-snapdragon/clock-apq8016.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #include "clock-snapdragon.h"
 
 /* GPLL0 clock control registers */
diff --git a/arch/arm/mach-snapdragon/clock-apq8096.c b/arch/arm/mach-snapdragon/clock-apq8096.c
index e5011be8f2e..c0116b434d5 100644
--- a/arch/arm/mach-snapdragon/clock-apq8096.c
+++ b/arch/arm/mach-snapdragon/clock-apq8096.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #include "clock-snapdragon.h"
 
 /* GPLL0 clock control registers */
diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
index 78e30ea5bab..efc3d9493fb 100644
--- a/arch/arm/mach-snapdragon/clock-snapdragon.c
+++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "clock-snapdragon.h"
 
 /* CBCR register fields */
diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.h b/arch/arm/mach-snapdragon/clock-snapdragon.h
index 58fab40a2e4..32f247a1aaa 100644
--- a/arch/arm/mach-snapdragon/clock-snapdragon.h
+++ b/arch/arm/mach-snapdragon/clock-snapdragon.h
@@ -7,6 +7,7 @@
 #ifndef _CLOCK_SNAPDRAGON_H
 #define _CLOCK_SNAPDRAGON_H
 
+#include <linux/types.h>
 #define CFG_CLK_SRC_CXO   (0 << 8)
 #define CFG_CLK_SRC_GPLL0 (1 << 8)
 #define CFG_CLK_SRC_MASK  (7 << 8)
diff --git a/arch/arm/mach-snapdragon/dram.c b/arch/arm/mach-snapdragon/dram.c
index df7148fee11..c168dd23e2d 100644
--- a/arch/arm/mach-snapdragon/dram.c
+++ b/arch/arm/mach-snapdragon/dram.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <part.h>
@@ -15,6 +16,7 @@
 #include <stdio.h>
 #include <asm/arch/dram.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define SMEM_USABLE_RAM_PARTITION_TABLE 402
 #define RAM_PART_NAME_LENGTH            16
diff --git a/arch/arm/mach-snapdragon/include/mach/misc.h b/arch/arm/mach-snapdragon/include/mach/misc.h
index c60e3e47247..5f7d74ba123 100644
--- a/arch/arm/mach-snapdragon/include/mach/misc.h
+++ b/arch/arm/mach-snapdragon/include/mach/misc.h
@@ -7,6 +7,7 @@
 #ifndef MISC_H
 #define MISC_H
 
+#include <asm/types.h>
 u32 msm_board_serial(void);
 void msm_generate_mac_addr(u8 *mac);
 
diff --git a/arch/arm/mach-snapdragon/misc.c b/arch/arm/mach-snapdragon/misc.c
index 03515f6d2bf..1af4734bfb7 100644
--- a/arch/arm/mach-snapdragon/misc.c
+++ b/arch/arm/mach-snapdragon/misc.c
@@ -10,6 +10,7 @@
 #include <mmc.h>
 #include <vsprintf.h>
 #include <asm/arch/misc.h>
+#include <asm/types.h>
 
 /* UNSTUFF_BITS macro taken from Linux Kernel: drivers/mmc/core/sd.c */
 #define UNSTUFF_BITS(resp, start, size) \
diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
index 1587d38cbfb..92d46702fa3 100644
--- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
+++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
@@ -14,6 +14,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinctrl-snapdragon.h"
 
 struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index 017af139bc9..f8c63355bf8 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 9c229de4b92..7b525ab3089 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <dt-bindings/clock/agilex-clock.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index 9d84871d463..b86eaeb8e3d 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 
diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c
index 85a3d1926c1..9c3de1657dd 100644
--- a/arch/arm/mach-socfpga/clock_manager_gen5.c
+++ b/arch/arm/mach-socfpga/clock_manager_gen5.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <asm/arch/clock_manager.h>
 #include <wait_bit.h>
+#include <linux/types.h>
 
 /*
  * function to write the bypass register which requires a poll of the
diff --git a/arch/arm/mach-socfpga/clock_manager_s10.c b/arch/arm/mach-socfpga/clock_manager_s10.c
index 6355a312833..35ea1b382ef 100644
--- a/arch/arm/mach-socfpga/clock_manager_s10.c
+++ b/arch/arm/mach-socfpga/clock_manager_s10.c
@@ -11,6 +11,7 @@
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/handoff_s10.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/firewall.c b/arch/arm/mach-socfpga/firewall.c
index ed411c62c9c..b3e9e01a137 100644
--- a/arch/arm/mach-socfpga/firewall.c
+++ b/arch/arm/mach-socfpga/firewall.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/arch/firewall.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static void firewall_l4_per_disable(void)
diff --git a/arch/arm/mach-socfpga/freeze_controller.c b/arch/arm/mach-socfpga/freeze_controller.c
index e994d38ba62..23930fbb704 100644
--- a/arch/arm/mach-socfpga/freeze_controller.c
+++ b/arch/arm/mach-socfpga/freeze_controller.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static const struct socfpga_freeze_controller *freeze_controller_base =
 		(void *)(SOCFPGA_SYSMGR_ADDRESS + SYSMGR_FRZCTRL_ADDRESS);
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager.h b/arch/arm/mach-socfpga/include/mach/clock_manager.h
index 1f734bcd65e..51e3d83c6dc 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager.h
@@ -6,9 +6,9 @@
 #ifndef _CLOCK_MANAGER_H_
 #define _CLOCK_MANAGER_H_
 
-phys_addr_t socfpga_get_clkmgr_addr(void);
-
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
+phys_addr_t socfpga_get_clkmgr_addr(void);
 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_gen5.h b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
index 5c9abe619b9..2f60680d952 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
@@ -8,6 +8,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 struct cm_config {
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 cb7923baef8..2d09fc194e2 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 <asm/types.h>
 #include <linux/bitops.h>
 
 /* Clock speed accessors */
diff --git a/arch/arm/mach-socfpga/include/mach/firewall.h b/arch/arm/mach-socfpga/include/mach/firewall.h
index adab65bc968..f7ff82d3e8a 100644
--- a/arch/arm/mach-socfpga/include/mach/firewall.h
+++ b/arch/arm/mach-socfpga/include/mach/firewall.h
@@ -7,6 +7,7 @@
 #ifndef	_FIREWALL_H_
 #define	_FIREWALL_H_
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 struct socfpga_firwall_l4_per {
diff --git a/arch/arm/mach-socfpga/include/mach/fpga_manager.h b/arch/arm/mach-socfpga/include/mach/fpga_manager.h
index 481b66bbd86..3f33e35cb28 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager.h
@@ -24,6 +24,7 @@
 #ifndef __ASSEMBLY__
 
 /* Common prototypes */
+#include <linux/types.h>
 int fpgamgr_get_mode(void);
 int fpgamgr_poll_fpga_ready(void);
 void fpgamgr_program_write(const void *rbf_data, size_t rbf_size);
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 048708202cc..edb5d4644f7 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
@@ -62,6 +62,7 @@
 #define FPGA_SOCFPGA_A10_RBF_CORE		0x8001
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 struct socfpga_fpga_manager {
 	u32  _pad_0x0_0x7[2];
 	u32  dclkcnt;
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 e08c0056286..9519544ec89 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
@@ -34,6 +34,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 struct socfpga_fpga_manager {
 	/* FPGA Manager Module */
 	u32	stat;			/* 0x00 */
diff --git a/arch/arm/mach-socfpga/include/mach/freeze_controller.h b/arch/arm/mach-socfpga/include/mach/freeze_controller.h
index 80846a67f19..65119929ee5 100644
--- a/arch/arm/mach-socfpga/include/mach/freeze_controller.h
+++ b/arch/arm/mach-socfpga/include/mach/freeze_controller.h
@@ -6,6 +6,7 @@
 #ifndef	_FREEZE_CONTROLLER_H_
 #define	_FREEZE_CONTROLLER_H_
 
+#include <asm/types.h>
 struct socfpga_freeze_controller {
 	u32	vioctrl;
 	u32	padding[3];
diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
index 55707ab9c58..e8fa9d1f0b9 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 <asm/types.h>
 #include <linux/bitops.h>
 #define MBOX_CLIENT_ID_UBOOT	0xB
 #define MBOX_ID_UBOOT		0x1
diff --git a/arch/arm/mach-socfpga/include/mach/misc.h b/arch/arm/mach-socfpga/include/mach/misc.h
index 32bca6775e2..ac023b89bbc 100644
--- a/arch/arm/mach-socfpga/include/mach/misc.h
+++ b/arch/arm/mach-socfpga/include/mach/misc.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <asm/sections.h>
+#include <asm/types.h>
 
 void dwmac_deassert_reset(const unsigned int of_reset_id, const u32 phymode);
 
diff --git a/arch/arm/mach-socfpga/include/mach/nic301.h b/arch/arm/mach-socfpga/include/mach/nic301.h
index 20bebb8c81c..0489e5fe1ad 100644
--- a/arch/arm/mach-socfpga/include/mach/nic301.h
+++ b/arch/arm/mach-socfpga/include/mach/nic301.h
@@ -6,6 +6,7 @@
 #ifndef	_NIC301_REGISTERS_H_
 #define	_NIC301_REGISTERS_H_
 
+#include <asm/types.h>
 struct nic301_registers {
 	u32	remap;				/* 0x0 */
 	/* Security Register Group */
diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager.h b/arch/arm/mach-socfpga/include/mach/reset_manager.h
index 7844ad14cb6..3af2c1f9e02 100644
--- a/arch/arm/mach-socfpga/include/mach/reset_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/reset_manager.h
@@ -6,6 +6,7 @@
 #ifndef _RESET_MANAGER_H_
 #define _RESET_MANAGER_H_
 
+#include <linux/types.h>
 phys_addr_t socfpga_get_rstmgr_addr(void);
 
 void reset_cpu(ulong addr);
diff --git a/arch/arm/mach-socfpga/include/mach/scan_manager.h b/arch/arm/mach-socfpga/include/mach/scan_manager.h
index 4d8d649be06..7d369aa1b5b 100644
--- a/arch/arm/mach-socfpga/include/mach/scan_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/scan_manager.h
@@ -6,6 +6,7 @@
 #ifndef	_SCAN_MANAGER_H_
 #define	_SCAN_MANAGER_H_
 
+#include <asm/types.h>
 struct socfpga_scan_manager {
 	u32	stat;
 	u32	en;
diff --git a/arch/arm/mach-socfpga/include/mach/scu.h b/arch/arm/mach-socfpga/include/mach/scu.h
index b684a550192..7891318486a 100644
--- a/arch/arm/mach-socfpga/include/mach/scu.h
+++ b/arch/arm/mach-socfpga/include/mach/scu.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_SCU_H__
 #define __SOCFPGA_SCU_H__
 
+#include <asm/types.h>
 struct scu_registers {
 	u32	ctrl;			/* 0x00 */
 	u32	cfg;
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
index ff05994ccc3..1af29b11cf7 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 <asm/types.h>
 #include <linux/bitops.h>
 int ddr_calibration_sequence(void);
 
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_gen5.h b/arch/arm/mach-socfpga/include/mach/sdram_gen5.h
index 8818a6b967f..05627eeed5e 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/sdram_gen5.h
@@ -7,6 +7,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 const struct socfpga_sdram_config *socfpga_get_sdram_config(void);
 
 void socfpga_get_seq_ac_init(const u32 **init, unsigned int *nelem);
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h b/arch/arm/mach-socfpga/include/mach/system_manager.h
index f8169547172..45ea62a7067 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager.h
@@ -6,6 +6,7 @@
 #ifndef _SYSTEM_MANAGER_H_
 #define _SYSTEM_MANAGER_H_
 
+#include <asm/types.h>
 phys_addr_t socfpga_get_sysmgr_addr(void);
 
 #if defined(CONFIG_TARGET_SOCFPGA_STRATIX10) || \
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/system_manager_gen5.h
index 90cb465d137..3dce656ccb4 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager_gen5.h
@@ -8,6 +8,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 void sysmgr_pinmux_init(void);
 void sysmgr_config_warmrstcfgio(int enable);
 
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 c90f63a754c..b6ae059a8cf 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 <asm/types.h>
 #include <linux/bitops.h>
 void sysmgr_pinmux_init(void);
 void populate_sysmgr_fpgaintf_module(void);
diff --git a/arch/arm/mach-socfpga/include/mach/timer.h b/arch/arm/mach-socfpga/include/mach/timer.h
index 82596e412e3..b853f208d73 100644
--- a/arch/arm/mach-socfpga/include/mach/timer.h
+++ b/arch/arm/mach-socfpga/include/mach/timer.h
@@ -6,6 +6,7 @@
 #ifndef _SOCFPGA_TIMER_H_
 #define _SOCFPGA_TIMER_H_
 
+#include <asm/types.h>
 struct socfpga_timer {
 	u32	load_val;
 	u32	curr_val;
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index 85df32968d8..46f94423726 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -13,6 +13,7 @@
 #include <asm/arch/mailbox_s10.h>
 #include <asm/arch/system_manager.h>
 #include <asm/secure.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 5a5f1a82779..6266b9d5535 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
index 980f0d97e88..999e4784cad 100644
--- a/arch/arm/mach-socfpga/misc_arria10.c
+++ b/arch/arm/mach-socfpga/misc_arria10.c
@@ -22,6 +22,7 @@
 #include <asm/arch/nic301.h>
 #include <asm/io.h>
 #include <asm/pl310.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #define PINMUX_UART0_TX_SHARED_IO_OFFSET_Q1_3	0x08
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 51e3568a1dd..93057bbb38d 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -6,12 +6,14 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index 9fea8e042aa..dc39387aebb 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -21,6 +21,7 @@
 #include <asm/arch/system_manager.h>
 #include <asm/arch/misc.h>
 #include <asm/pl310.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-socfpga/pinmux_arria10.c b/arch/arm/mach-socfpga/pinmux_arria10.c
index aee51c039c9..bcb715c355b 100644
--- a/arch/arm/mach-socfpga/pinmux_arria10.c
+++ b/arch/arm/mach-socfpga/pinmux_arria10.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <common.h>
 #include <fdtdec.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-socfpga/reset_manager_arria10.c b/arch/arm/mach-socfpga/reset_manager_arria10.c
index 461c4592800..150e71858df 100644
--- a/arch/arm/mach-socfpga/reset_manager_arria10.c
+++ b/arch/arm/mach-socfpga/reset_manager_arria10.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <wait_bit.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-socfpga/reset_manager_gen5.c
index e37325f2ac5..7ca52b82917 100644
--- a/arch/arm/mach-socfpga/reset_manager_gen5.c
+++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
@@ -11,6 +11,7 @@
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /* Assert or de-assert SoCFPGA reset manager reset. */
diff --git a/arch/arm/mach-socfpga/reset_manager_s10.c b/arch/arm/mach-socfpga/reset_manager_s10.c
index 81e4c67fba6..a9179940e57 100644
--- a/arch/arm/mach-socfpga/reset_manager_s10.c
+++ b/arch/arm/mach-socfpga/reset_manager_s10.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 #include <dt-bindings/reset/altr,rst-mgr-s10.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/scan_manager.c b/arch/arm/mach-socfpga/scan_manager.c
index d5601739ef6..85c113f5051 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 <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index daf75addde7..cda0ba5be50 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -31,6 +31,7 @@
 #include <asm/arch/fpga_manager.h>
 #include <mmc.h>
 #include <memalign.h>
+#include <linux/types.h>
 
 #define FPGA_BUFSIZ	16 * 1024
 
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index 9871d1b6c8b..0364f5a5d0f 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -22,6 +22,7 @@
 #include <asm/arch/system_manager.h>
 #include <watchdog.h>
 #include <dm/uclass.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index 2cffc2ef778..54f2674b399 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -27,6 +27,7 @@
 #include <watchdog.h>
 #include <dm/uclass.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index cbffa669936..93d20391773 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -23,6 +23,7 @@
 #include <asm/arch/system_manager.h>
 #include <watchdog.h>
 #include <dm/uclass.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/system_manager_gen5.c b/arch/arm/mach-socfpga/system_manager_gen5.c
index 09caebb3c88..ce95062ea80 100644
--- a/arch/arm/mach-socfpga/system_manager_gen5.c
+++ b/arch/arm/mach-socfpga/system_manager_gen5.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch/system_manager.h>
 #include <asm/arch/fpga_manager.h>
+#include <asm/types.h>
 
 /*
  * Populate the value for SYSMGR.FPGAINTF.MODULE based on pinmux setting.
diff --git a/arch/arm/mach-socfpga/system_manager_s10.c b/arch/arm/mach-socfpga/system_manager_s10.c
index c123cc96445..dba1b95ba81 100644
--- a/arch/arm/mach-socfpga/system_manager_s10.c
+++ b/arch/arm/mach-socfpga/system_manager_s10.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/wrap_pinmux_config.c b/arch/arm/mach-socfpga/wrap_pinmux_config.c
index f5a425db559..b4c1a5cd83a 100644
--- a/arch/arm/mach-socfpga/wrap_pinmux_config.c
+++ b/arch/arm/mach-socfpga/wrap_pinmux_config.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /* Board-specific header. */
diff --git a/arch/arm/mach-socfpga/wrap_pinmux_config_s10.c b/arch/arm/mach-socfpga/wrap_pinmux_config_s10.c
index 8f3688dd19f..877c7a21c7f 100644
--- a/arch/arm/mach-socfpga/wrap_pinmux_config_s10.c
+++ b/arch/arm/mach-socfpga/wrap_pinmux_config_s10.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/arch/handoff_s10.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static void sysmgr_pinmux_handoff_read(void *handoff_address,
diff --git a/arch/arm/mach-socfpga/wrap_pll_config_s10.c b/arch/arm/mach-socfpga/wrap_pll_config_s10.c
index 3da85791a1f..bd754ced8c5 100644
--- a/arch/arm/mach-socfpga/wrap_pll_config_s10.c
+++ b/arch/arm/mach-socfpga/wrap_pll_config_s10.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/handoff_s10.h>
 #include <asm/arch/system_manager.h>
+#include <asm/types.h>
 
 const struct cm_config * const cm_get_default_config(void)
 {
diff --git a/arch/arm/mach-socfpga/wrap_sdram_config.c b/arch/arm/mach-socfpga/wrap_sdram_config.c
index 50fec073b48..3fe77f55cfa 100644
--- a/arch/arm/mach-socfpga/wrap_sdram_config.c
+++ b/arch/arm/mach-socfpga/wrap_sdram_config.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <errno.h>
 #include <asm/arch/sdram.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /* Board-specific header. */
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 6b5a5c64cb4..ba2c8aaab87 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/bsec.h>
 #include <asm/arch/stm32mp1_smc.h>
+#include <asm/types.h>
 #include <linux/arm-smccc.h>
 #include <linux/errno.h>
 #include <linux/iopoll.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
index a5c94d331e6..6260099af16 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
@@ -14,6 +14,7 @@
 #include <dm/uclass.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define STM32_OTP_HASH_KEY_START 24
 #define STM32_OTP_HASH_KEY_SIZE 8
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index df38f622210..5378f5e1b57 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -13,6 +13,7 @@
 #include <asm/arch/stm32prog.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "stm32prog.h"
 
 struct stm32prog_data *stm32prog_data;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 74b2ba277b3..9e61f3dfc19 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -10,6 +10,7 @@
 #include <misc.h>
 #include <mmc.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/stm32mp1_smc.h>
@@ -25,6 +26,7 @@
 #include <linux/printk.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "stm32prog.h"
 
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index 46f014cb77f..29e524ef36f 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* - phase defines ------------------------------------------------*/
 #define PHASE_FLASHLAYOUT	0x00
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 55485302012..b90b7149d8d 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
index a170fdfee94..8afdaffc240 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "stm32prog.h"
 
 static int stm32prog_set_phase(struct stm32prog_data *data, u8 phase,
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 50959da323e..c9b475d4a5e 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <env.h>
@@ -25,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.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 77fd34148d7..8da8490fa50 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c
index e83885440b4..61d633d31b4 100644
--- a/arch/arm/mach-stm32mp/fdt.c
+++ b/arch/arm/mach-stm32mp/fdt.c
@@ -7,9 +7,11 @@
 #include <fdtdec.h>
 #include <fdt_support.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <tee.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dt-bindings/pinctrl/stm32-pinfunc.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-stm32mp/include/mach/gpio.h b/arch/arm/mach-stm32mp/include/mach/gpio.h
index 5ca76d21ff1..ba383e82c3a 100644
--- a/arch/arm/mach-stm32mp/include/mach/gpio.h
+++ b/arch/arm/mach-stm32mp/include/mach/gpio.h
@@ -7,6 +7,7 @@
 #ifndef _STM32_GPIO_H_
 #define _STM32_GPIO_H_
 #include <asm/gpio.h>
+#include <asm/types.h>
 
 #define STM32_GPIOS_PER_BANK		16
 
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h b/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
index fbc082703dc..353ec1b7587 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
@@ -6,6 +6,7 @@
 #ifndef __STM32MP1_SMC_H__
 #define __STM32MP1_SMC_H__
 
+#include <asm/types.h>
 #include <linux/arm-smccc.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
diff --git a/arch/arm/mach-stm32mp/include/mach/sys_proto.h b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
index 4149d3a1337..ffb2ea2019d 100644
--- a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
+++ b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
@@ -4,6 +4,7 @@
  */
 
 /* ID = Device Version (bit31:16) + Device Part Number (RPN) (bit7:0) */
+#include <asm/types.h>
 #define CPU_STM32MP157Cxx	0x05000000
 #define CPU_STM32MP157Axx	0x05000001
 #define CPU_STM32MP153Cxx	0x05000024
diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
index 155aa79cd5e..beca18d6fbc 100644
--- a/arch/arm/mach-stm32mp/psci.c
+++ b/arch/arm/mach-stm32mp/psci.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/psci.h>
 #include <asm/secure.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 #define BOOT_API_A7_CORE0_MAGIC_NUMBER	0xCA7FACE0
diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c
index 954603f6745..f478c3b8b00 100644
--- a/arch/arm/mach-stm32mp/pwr_regulator.c
+++ b/arch/arm/mach-stm32mp/pwr_regulator.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <time.h>
 #include <asm/io.h>
@@ -13,6 +14,7 @@
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.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 d2aae1a69f1..5e6aef9c390 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
@@ -18,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
+#include <linux/types.h>
 
 u32 spl_boot_device(void)
 {
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index d7e77f95747..68332d27fe7 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -29,6 +29,7 @@
 #include <asm/arch/tzpc.h>
 #include <asm/arch/mmc.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <linux/compiler.h>
 
diff --git a/arch/arm/mach-sunxi/clock.c b/arch/arm/mach-sunxi/clock.c
index f591affebf7..e804cacf186 100644
--- a/arch/arm/mach-sunxi/clock.c
+++ b/arch/arm/mach-sunxi/clock.c
@@ -8,12 +8,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/gtbus.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 __weak void clock_init_sec(void)
 {
diff --git a/arch/arm/mach-sunxi/clock_sun4i.c b/arch/arm/mach-sunxi/clock_sun4i.c
index 7799c5750d3..4646d4cff59 100644
--- a/arch/arm/mach-sunxi/clock_sun4i.c
+++ b/arch/arm/mach-sunxi/clock_sun4i.c
@@ -16,6 +16,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/clock_sun50i_h6.c b/arch/arm/mach-sunxi/clock_sun50i_h6.c
index ba8a26eb0d3..10fe7748f03 100644
--- a/arch/arm/mach-sunxi/clock_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/clock_sun50i_h6.c
@@ -2,6 +2,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index 529fdd7754e..5e79a1a2e57 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -17,6 +17,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.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 31e4281529a..c29cf314023 100644
--- a/arch/arm/mach-sunxi/clock_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/clock_sun8i_a83t.c
@@ -15,6 +15,7 @@
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/clock_sun9i.c b/arch/arm/mach-sunxi/clock_sun9i.c
index 8ba4802f3b3..1765ac31eb7 100644
--- a/arch/arm/mach-sunxi/clock_sun9i.c
+++ b/arch/arm/mach-sunxi/clock_sun9i.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
index 5a7d03dce89..1e10defc075 100644
--- a/arch/arm/mach-sunxi/cpu_info.c
+++ b/arch/arm/mach-sunxi/cpu_info.c
@@ -14,6 +14,7 @@
 #include <axp_pmic.h>
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_MACH_SUN6I
 int sunxi_get_ss_bonding_id(void)
diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c
index ffadaa42570..cc61d5747aa 100644
--- a/arch/arm/mach-sunxi/dram_helpers.c
+++ b/arch/arm/mach-sunxi/dram_helpers.c
@@ -12,6 +12,7 @@
 #include <asm/barriers.h>
 #include <asm/io.h>
 #include <asm/arch/dram.h>
+#include <linux/types.h>
 
 /*
  * Wait up to 1s for value to be set in given part of reg.
diff --git a/arch/arm/mach-sunxi/dram_sun4i.c b/arch/arm/mach-sunxi/dram_sun4i.c
index 6c406f11156..d51fd207001 100644
--- a/arch/arm/mach-sunxi/dram_sun4i.c
+++ b/arch/arm/mach-sunxi/dram_sun4i.c
@@ -22,12 +22,14 @@
 
 #include <common.h>
 #include <init.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/timer.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index ea47fa86478..ec351079037 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.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 53f8ac068ae..ba310e1192f 100644
--- a/arch/arm/mach-sunxi/dram_sun6i.c
+++ b/arch/arm/mach-sunxi/dram_sun6i.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <asm/types.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 3ed97b59a32..25084956ebb 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a23.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a23.c
@@ -26,6 +26,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 static const struct dram_para dram_para = {
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a33.c b/arch/arm/mach-sunxi/dram_sun8i_a33.c
index 5b993afe3ef..c2ea86ffd62 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a83t.c b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
index bf627921440..93c90ccbb0f 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-sunxi/dram_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
index e2ab5d2fafb..b499b841649 100644
--- a/arch/arm/mach-sunxi/dram_sun9i.c
+++ b/arch/arm/mach-sunxi/dram_sun9i.c
@@ -21,6 +21,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 
 #define DRAM_CLK (CONFIG_DRAM_CLK * 1000000)
 
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index 3fa8509efb9..6147d0f745f 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -19,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/kconfig.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static void mctl_phy_init(u32 val)
 {
diff --git a/arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c b/arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c
index 14ee586e147..eef6e0b66da 100644
--- a/arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c
+++ b/arch/arm/mach-sunxi/dram_timings/ddr2_v3s.c
@@ -2,6 +2,7 @@
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 void mctl_set_timing_params(uint16_t socid, struct dram_para *para)
 {
diff --git a/arch/arm/mach-sunxi/dram_timings/ddr3_1333.c b/arch/arm/mach-sunxi/dram_timings/ddr3_1333.c
index a297d469a90..d2fb7203822 100644
--- a/arch/arm/mach-sunxi/dram_timings/ddr3_1333.c
+++ b/arch/arm/mach-sunxi/dram_timings/ddr3_1333.c
@@ -2,6 +2,7 @@
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 void mctl_set_timing_params(uint16_t socid, struct dram_para *para)
 {
diff --git a/arch/arm/mach-sunxi/dram_timings/h6_ddr3_1333.c b/arch/arm/mach-sunxi/dram_timings/h6_ddr3_1333.c
index 6160518efee..bceae65edb0 100644
--- a/arch/arm/mach-sunxi/dram_timings/h6_ddr3_1333.c
+++ b/arch/arm/mach-sunxi/dram_timings/h6_ddr3_1333.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /*
diff --git a/arch/arm/mach-sunxi/dram_timings/h6_lpddr3.c b/arch/arm/mach-sunxi/dram_timings/h6_lpddr3.c
index 497c59d8ae2..641abdbd9db 100644
--- a/arch/arm/mach-sunxi/dram_timings/h6_lpddr3.c
+++ b/arch/arm/mach-sunxi/dram_timings/h6_lpddr3.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 static u32 mr_lpddr3[12] = {
diff --git a/arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c b/arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c
index 6378bbc22a3..071628657c0 100644
--- a/arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c
+++ b/arch/arm/mach-sunxi/dram_timings/lpddr3_stock.c
@@ -2,6 +2,7 @@
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 void mctl_set_timing_params(uint16_t socid, struct dram_para *para)
 {
diff --git a/arch/arm/mach-sunxi/p2wi.c b/arch/arm/mach-sunxi/p2wi.c
index 550b37b3663..f8fc04c96eb 100644
--- a/arch/arm/mach-sunxi/p2wi.c
+++ b/arch/arm/mach-sunxi/p2wi.c
@@ -23,6 +23,7 @@
 #include <asm/arch/prcm.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 void p2wi_init(void)
diff --git a/arch/arm/mach-sunxi/pinmux.c b/arch/arm/mach-sunxi/pinmux.c
index 642483f06c5..ab8fc812635 100644
--- a/arch/arm/mach-sunxi/pinmux.c
+++ b/arch/arm/mach-sunxi/pinmux.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
+#include <asm/types.h>
 
 void sunxi_gpio_set_cfgbank(struct sunxi_gpio *pio, int bank_offset, u32 val)
 {
diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index dea42de833f..0e23f7fa2f0 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -13,6 +13,7 @@
 #include <asm/arch/rsb.h>
 #include <i2c.h>
 #include <asm/arch/pmic_bus.h>
+#include <asm/types.h>
 
 #define AXP152_I2C_ADDR			0x30
 
diff --git a/arch/arm/mach-sunxi/prcm.c b/arch/arm/mach-sunxi/prcm.c
index 71a2e44918e..4970022fe5b 100644
--- a/arch/arm/mach-sunxi/prcm.c
+++ b/arch/arm/mach-sunxi/prcm.c
@@ -19,6 +19,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 
 /* APB0 clock gate and reset bit offsets are the same. */
 void prcm_apb0_enable(u32 flags)
diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c
index 2ec63f5a568..781f22053ea 100644
--- a/arch/arm/mach-sunxi/rsb.c
+++ b/arch/arm/mach-sunxi/rsb.c
@@ -15,6 +15,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/rsb.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static int rsb_set_device_mode(void);
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index f9e1f27363f..aa8416d3e6a 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -13,6 +13,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_OS_BOOT
 #error CONFIG_SPL_OS_BOOT is not supported yet
diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index f8a1b36ed93..6e4fae24bc9 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -21,6 +21,7 @@
 #include <asm/arch-tegra/scu.h>
 #include <asm/arch-tegra/tegra.h>
 #include <asm/arch-tegra/warmboot.h>
+#include <linux/types.h>
 
 int tegra_get_chip(void)
 {
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index cd0eb258bf9..8d5d5e25f80 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <ns16550.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -31,6 +32,7 @@
 #include <asm/arch-tegra/sys_proto.h>
 #include <asm/arch-tegra/warmboot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 void save_boot_params_ret(void);
 
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 819dabd90ea..3a48f01eb82 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
@@ -39,6 +40,7 @@
 #include <asm/arch/emc.h>
 #endif
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "emc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-tegra/cache.c b/arch/arm/mach-tegra/cache.c
index d7063490e22..bea1013f891 100644
--- a/arch/arm/mach-tegra/cache.c
+++ b/arch/arm/mach-tegra/cache.c
@@ -11,6 +11,7 @@
 #if IS_ENABLED(CONFIG_TEGRA_GP_PADCTRL)
 #include <asm/arch/gp_padctrl.h>
 #endif
+#include <asm/types.h>
 
 #ifndef CONFIG_ARM64
 void config_cache(void)
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 8760abbe9d4..6523daa48ee 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -21,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/ctype.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 567ba52ee88..17b88423ddd 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -6,10 +6,12 @@
 /* Tegra SoC common clock control functions */
 
 #include <common.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/io.h>
@@ -22,6 +24,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * This is our record of the current clock rate of each clock. We don't
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index 216e307ccb2..22a04e30aee 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -15,6 +15,7 @@
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/scu.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "cpu.h"
 
 int get_num_cpus(void)
diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index 216673e4367..2e75b8bd059 100644
--- a/arch/arm/mach-tegra/ivc.c
+++ b/arch/arm/mach-tegra/ivc.c
@@ -10,6 +10,7 @@
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 64c397fa497..67645261907 100644
--- a/arch/arm/mach-tegra/pinmux-common.c
+++ b/arch/arm/mach-tegra/pinmux-common.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
+#include <asm/types.h>
 
 /* return 1 if a pingrp is in range */
 #define pmux_pingrp_isvalid(pin) (((pin) >= 0) && ((pin) < PMUX_PINGRP_COUNT))
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index f4747484f29..225ff46d660 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 #include <linux/arm-smccc.h>
 
diff --git a/arch/arm/mach-tegra/spl.c b/arch/arm/mach-tegra/spl.c
index ed897efc5f0..15e8031efe1 100644
--- a/arch/arm/mach-tegra/spl.c
+++ b/arch/arm/mach-tegra/spl.c
@@ -9,6 +9,7 @@
 #include <debug_uart.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/types.h>
 
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index 53d958e82dd..10265cc5737 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -19,6 +19,7 @@
 #include <div64.h>
 #include <fdtdec.h>
 #include <linux/delay.h>
+#include <linux/types.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 7e529130ad5..04c11747ea9 100644
--- a/arch/arm/mach-tegra/tegra114/cpu.c
+++ b/arch/arm/mach-tegra/tegra114/cpu.c
@@ -14,6 +14,7 @@
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include "../cpu.h"
 
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index edca9c3fdc3..6ae99246965 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -20,6 +20,7 @@
 #include <div64.h>
 #include <fdtdec.h>
 #include <linux/delay.h>
+#include <linux/types.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 2fce060037a..0adc4ccb233 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -16,6 +16,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/ap.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include "../cpu.h"
 
diff --git a/arch/arm/mach-tegra/tegra124/psci.c b/arch/arm/mach-tegra/tegra124/psci.c
index ab102a62261..98e556b3169 100644
--- a/arch/arm/mach-tegra/tegra124/psci.c
+++ b/arch/arm/mach-tegra/tegra124/psci.c
@@ -11,6 +11,7 @@
 #include <asm/arch/powergate.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/pmc.h>
+#include <asm/types.h>
 
 static void park_cpu(void)
 {
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index 52398eba3fa..a4b7b1e25ed 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index c8db06cf66c..2bc7f9338ee 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 e5b60598f7f..9d182acc45f 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 <asm/types.h>
 #include <linux/delay.h>
 #include "../cpu.h"
 
diff --git a/arch/arm/mach-tegra/tegra20/crypto.c b/arch/arm/mach-tegra/tegra20/crypto.c
index 1efaa5c3ecd..e151daa2b27 100644
--- a/arch/arm/mach-tegra/tegra20/crypto.c
+++ b/arch/arm/mach-tegra/tegra20/crypto.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "crypto.h"
 #include "uboot_aes.h"
diff --git a/arch/arm/mach-tegra/tegra20/crypto.h b/arch/arm/mach-tegra/tegra20/crypto.h
index a773d03fc74..ecd11272c58 100644
--- a/arch/arm/mach-tegra/tegra20/crypto.h
+++ b/arch/arm/mach-tegra/tegra20/crypto.h
@@ -14,6 +14,7 @@
  * \param length	Size of source data
  * \param signature	Destination address for signature, AES_KEY_LENGTH bytes
  */
+#include <asm/types.h>
 int sign_data_block(u8 *source, unsigned length, u8 *signature);
 
 #endif /* #ifndef _CRYPTO_H_ */
diff --git a/arch/arm/mach-tegra/tegra20/emc.c b/arch/arm/mach-tegra/tegra20/emc.c
index 58abf790bd1..116393fcc06 100644
--- a/arch/arm/mach-tegra/tegra20/emc.c
+++ b/arch/arm/mach-tegra/tegra20/emc.c
@@ -13,6 +13,7 @@
 #include <asm/arch/emc.h>
 #include <asm/arch/tegra.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * The EMC registers have shadow registers.  When the EMC clock is updated
diff --git a/arch/arm/mach-tegra/tegra20/warmboot.c b/arch/arm/mach-tegra/tegra20/warmboot.c
index f0050a4f821..404b93dffd3 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot.c
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/emc.h>
diff --git a/arch/arm/mach-tegra/tegra20/warmboot_avp.c b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
index be801d108e3..10ed02bd32f 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot_avp.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
@@ -15,6 +15,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/warmboot.h>
+#include <asm/types.h>
 #include "warmboot_avp.h"
 
 #define DEBUG_RESET_CORESIGHT
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 48f7e354108..5597016b8d3 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -24,6 +24,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /*
  * Clock types that we can use as a source. The Tegra210 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index 78cea2b9193..9b4bff7c97e 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index b35f02eedd4..a256a068625 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 651edd27ee8..bb2e711d63e 100644
--- a/arch/arm/mach-tegra/tegra30/cpu.c
+++ b/arch/arm/mach-tegra/tegra30/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/tegra_i2c.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "../cpu.h"
 
 /* Tegra30-specific CPU init code */
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index 94a271311ce..d22f1d48759 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.h b/arch/arm/mach-tegra/xusb-padctl-common.h
index e3fd613f2be..1899f5aee5d 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.h
+++ b/arch/arm/mach-tegra/xusb-padctl-common.h
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <asm/types.h>
 #include <dm/ofnode.h>
 
 #include <asm/io.h>
diff --git a/arch/arm/mach-u8500/cpuinfo.c b/arch/arm/mach-u8500/cpuinfo.c
index bc3fd036035..9c386005aad 100644
--- a/arch/arm/mach-u8500/cpuinfo.c
+++ b/arch/arm/mach-u8500/cpuinfo.c
@@ -7,6 +7,7 @@
 #include <init.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define U8500_BOOTROM_BASE	0x90000000
 #define U8500_ASIC_ID_LOC_V2	(U8500_BOOTROM_BASE + 0x1DBF4)
diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
index cde2a8124fe..78b1ad98adf 100644
--- a/arch/arm/mach-uniphier/arm32/cache-uniphier.c
+++ b/arch/arm/mach-uniphier/arm32/cache-uniphier.c
@@ -5,7 +5,9 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <cpu_func.h>
+#include <asm/types.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <asm/armv7.h>
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index a4d260aeced..e099c91bb6a 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -16,6 +16,7 @@
 #include <asm/psci.h>
 #include <asm/secure.h>
 #include <asm/system.h>
+#include <linux/types.h>
 
 #include "../debug.h"
 #include "../soc-info.h"
diff --git a/arch/arm/mach-uniphier/base-address.c b/arch/arm/mach-uniphier/base-address.c
index 1ba55eb7ebb..344209f63da 100644
--- a/arch/arm/mach-uniphier/base-address.c
+++ b/arch/arm/mach-uniphier/base-address.c
@@ -3,6 +3,7 @@
 // Copyright (C) 2019 Socionext Inc.
 //   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
 
+#include <compiler.h>
 #include <dm/of.h>
 #include <fdt_support.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c
index b112b4c8cad..2cc9c539e8e 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 at socionext.com>
  */
 
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c b/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
index 4689ed79fdc..85539ea4aa6 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-ld11.c
@@ -5,6 +5,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
index 677470cdc64..e0724021b91 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c
@@ -5,6 +5,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/io.h>
 #include <linux/kernel.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 68880993127..9076f55039c 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
@@ -5,6 +5,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.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 1e6bc8433f7..fc7404e1f3e 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -6,7 +6,9 @@
 
 #include <command.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.h b/arch/arm/mach-uniphier/boot-device/boot-device.h
index bbb634316b3..43ec1094760 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.h
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.h
@@ -7,6 +7,7 @@
 #ifndef _UNIPHIER_BOOT_DEVICE_H_
 #define _UNIPHIER_BOOT_DEVICE_H_
 
+#include <asm/types.h>
 struct uniphier_boot_device {
 	unsigned int boot_device;
 	const char *desc;
diff --git a/arch/arm/mach-uniphier/clk/clk-dram-ld4.c b/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
index 3b721eaf234..004a32f29a8 100644
--- a/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
+++ b/arch/arm/mach-uniphier/clk/clk-dram-ld4.c
@@ -5,6 +5,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-dram-pro5.c b/arch/arm/mach-uniphier/clk/clk-dram-pro5.c
index 808d1ebfe19..43e215d3ded 100644
--- a/arch/arm/mach-uniphier/clk/clk-dram-pro5.c
+++ b/arch/arm/mach-uniphier/clk/clk-dram-pro5.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2015-2017 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
index 75d3e70d6aa..27629be7656 100644
--- a/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
+++ b/arch/arm/mach-uniphier/clk/clk-dram-pxs2.c
@@ -4,6 +4,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-early-ld4.c b/arch/arm/mach-uniphier/clk/clk-early-ld4.c
index 25b72d8926c..1ba584d09be 100644
--- a/arch/arm/mach-uniphier/clk/clk-early-ld4.c
+++ b/arch/arm/mach-uniphier/clk/clk-early-ld4.c
@@ -5,6 +5,7 @@
  */
 
 #include <spl.h>
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c
index d241a65382f..cf2205c9a1f 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld11.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld11.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2016 Socionext Inc.
  */
 
+#include <compiler.h>
 #include <spl.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-uniphier/clk/clk-ld20.c b/arch/arm/mach-uniphier/clk/clk-ld20.c
index 397b2d7384f..1d077dd0f1d 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld20.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld20.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2017 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/clk-pro4.c b/arch/arm/mach-uniphier/clk/clk-pro4.c
index 798128b3024..34d6d90fe68 100644
--- a/arch/arm/mach-uniphier/clk/clk-pro4.c
+++ b/arch/arm/mach-uniphier/clk/clk-pro4.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-pro5.c b/arch/arm/mach-uniphier/clk/clk-pro5.c
index 36006fd256c..821689b12db 100644
--- a/arch/arm/mach-uniphier/clk/clk-pro5.c
+++ b/arch/arm/mach-uniphier/clk/clk-pro5.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/clk-pxs2.c b/arch/arm/mach-uniphier/clk/clk-pxs2.c
index c2a75ce0001..e1b867ac3b0 100644
--- a/arch/arm/mach-uniphier/clk/clk-pxs2.c
+++ b/arch/arm/mach-uniphier/clk/clk-pxs2.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/clk-pxs3.c b/arch/arm/mach-uniphier/clk/clk-pxs3.c
index 33b9c5b73d1..0d6f6a5c666 100644
--- a/arch/arm/mach-uniphier/clk/clk-pxs3.c
+++ b/arch/arm/mach-uniphier/clk/clk-pxs3.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2017 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/dpll-ld4.c b/arch/arm/mach-uniphier/clk/dpll-ld4.c
index fcdd2fddab3..082eeea9c67 100644
--- a/arch/arm/mach-uniphier/clk/dpll-ld4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-ld4.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/clk/dpll-pro4.c b/arch/arm/mach-uniphier/clk/dpll-pro4.c
index b5ba17af136..4d38440d397 100644
--- a/arch/arm/mach-uniphier/clk/dpll-pro4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-pro4.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/clk/dpll-sld8.c b/arch/arm/mach-uniphier/clk/dpll-sld8.c
index 1ac52d11f34..526b1c4cbbd 100644
--- a/arch/arm/mach-uniphier/clk/dpll-sld8.c
+++ b/arch/arm/mach-uniphier/clk/dpll-sld8.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/dpll-tail.c b/arch/arm/mach-uniphier/clk/dpll-tail.c
index 6ba5a367274..ac99313e8c0 100644
--- a/arch/arm/mach-uniphier/clk/dpll-tail.c
+++ b/arch/arm/mach-uniphier/clk/dpll-tail.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <asm/types.h>
 #include <linux/io.h>
 
 #include "../sc-regs.h"
diff --git a/arch/arm/mach-uniphier/clk/pll-base-ld20.c b/arch/arm/mach-uniphier/clk/pll-base-ld20.c
index ea96d739c53..8b5b53da439 100644
--- a/arch/arm/mach-uniphier/clk/pll-base-ld20.c
+++ b/arch/arm/mach-uniphier/clk/pll-base-ld20.c
@@ -4,6 +4,8 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-uniphier/clk/pll-ld4.c b/arch/arm/mach-uniphier/clk/pll-ld4.c
index c66031bdd05..91eab0d0565 100644
--- a/arch/arm/mach-uniphier/clk/pll-ld4.c
+++ b/arch/arm/mach-uniphier/clk/pll-ld4.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/pll-pro4.c b/arch/arm/mach-uniphier/clk/pll-pro4.c
index b7dc3e261f8..4b27bead1cf 100644
--- a/arch/arm/mach-uniphier/clk/pll-pro4.c
+++ b/arch/arm/mach-uniphier/clk/pll-pro4.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
index f64ff39c9e6..77b6143b8d3 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
@@ -4,6 +4,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
index 79c6c101e22..66a0d3226e4 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
@@ -4,6 +4,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
index ef3b383ee43..347e91871a2 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
@@ -4,6 +4,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
index ee8caad1d45..5a6674e5cbb 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
@@ -4,6 +4,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
index d116d46812d..cbe61e614a4 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
@@ -3,7 +3,9 @@
  * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <debug_uart.h>
+#include <asm/types.h>
 #include <linux/io.h>
 #include <linux/serial_reg.h>
 
diff --git a/arch/arm/mach-uniphier/debug.h b/arch/arm/mach-uniphier/debug.h
index 466dc9b03bf..7f699fdb6c7 100644
--- a/arch/arm/mach-uniphier/debug.h
+++ b/arch/arm/mach-uniphier/debug.h
@@ -7,6 +7,7 @@
 #ifndef __DEBUG_H__
 #define __DEBUG_H__
 
+#include <compiler.h>
 #include <linux/io.h>
 #include <linux/serial_reg.h>
 
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
index be4ce3265bb..d36bc4834b5 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
@@ -5,11 +5,13 @@
  */
 
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../soc-info.h"
 #include "ddrmphy-regs.h"
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
index 3ccafe20638..0d4f88327c8 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
@@ -6,11 +6,13 @@
  */
 
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../soc-info.h"
 #include "ddrphy-regs.h"
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
index 747bc64403d..a5ee11da47d 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c
@@ -4,7 +4,9 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
index 1decdf1cbff..afe70f00bb1 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 <compiler.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
@@ -11,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <time.h>
+#include <linux/types.h>
 
 #include "ddrphy-init.h"
 #include "ddrphy-regs.h"
diff --git a/arch/arm/mach-uniphier/dram/umc-ld4.c b/arch/arm/mach-uniphier/dram/umc-ld4.c
index 5b840aa0ea1..ad493df603e 100644
--- a/arch/arm/mach-uniphier/dram/umc-ld4.c
+++ b/arch/arm/mach-uniphier/dram/umc-ld4.c
@@ -5,7 +5,9 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pro4.c b/arch/arm/mach-uniphier/dram/umc-pro4.c
index e1a98e59c05..e4e7fae9ba2 100644
--- a/arch/arm/mach-uniphier/dram/umc-pro4.c
+++ b/arch/arm/mach-uniphier/dram/umc-pro4.c
@@ -5,7 +5,9 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 0af7ea38621..733550a1b61 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -7,6 +7,8 @@
  * Copyright (C) 2015 Socionext Inc.
  */
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-sld8.c b/arch/arm/mach-uniphier/dram/umc-sld8.c
index 28b366ebdea..60ea309e964 100644
--- a/arch/arm/mach-uniphier/dram/umc-sld8.c
+++ b/arch/arm/mach-uniphier/dram/umc-sld8.c
@@ -5,7 +5,9 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.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 7f2753190c2..b71ba75d33c 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -6,6 +6,8 @@
  */
 
 #include <init.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/memconf.c b/arch/arm/mach-uniphier/memconf.c
index 7a79340a92c..7fd798445b7 100644
--- a/arch/arm/mach-uniphier/memconf.c
+++ b/arch/arm/mach-uniphier/memconf.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index 07ce46bd9dd..7d2e08fd6eb 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -5,10 +5,12 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <dm.h>
 #include <fdt_support.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/mmc-boot-mode.c b/arch/arm/mach-uniphier/mmc-boot-mode.c
index e47e5df6480..264a3c2a00c 100644
--- a/arch/arm/mach-uniphier/mmc-boot-mode.c
+++ b/arch/arm/mach-uniphier/mmc-boot-mode.c
@@ -6,6 +6,7 @@
 
 #include <mmc.h>
 #include <spl.h>
+#include <asm/types.h>
 
 u32 spl_mmc_boot_mode(const u32 boot_device)
 {
diff --git a/arch/arm/mach-uniphier/reset.c b/arch/arm/mach-uniphier/reset.c
index 5fffd23e9a5..a065935af32 100644
--- a/arch/arm/mach-uniphier/reset.c
+++ b/arch/arm/mach-uniphier/reset.c
@@ -6,6 +6,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/types.h>
 #include <linux/io.h>
 #include <asm/secure.h>
 
diff --git a/arch/arm/mach-uniphier/sc-regs.h b/arch/arm/mach-uniphier/sc-regs.h
index e43116e064b..c6ce432c597 100644
--- a/arch/arm/mach-uniphier/sc-regs.h
+++ b/arch/arm/mach-uniphier/sc-regs.h
@@ -11,6 +11,7 @@
 #define ARCH_SC_REGS_H
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <linux/compiler.h>
 #define sc_base			((void __iomem *)SC_BASE)
 #endif
diff --git a/arch/arm/mach-uniphier/sc64-regs.h b/arch/arm/mach-uniphier/sc64-regs.h
index fdcca232b61..ee34465aa48 100644
--- a/arch/arm/mach-uniphier/sc64-regs.h
+++ b/arch/arm/mach-uniphier/sc64-regs.h
@@ -10,6 +10,7 @@
 #define SC64_REGS_H
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <linux/compiler.h>
 extern void __iomem *sc_base;
 #endif
diff --git a/arch/arm/mach-uniphier/sg-regs.h b/arch/arm/mach-uniphier/sg-regs.h
index f47d1019498..7a876bcbfe7 100644
--- a/arch/arm/mach-uniphier/sg-regs.h
+++ b/arch/arm/mach-uniphier/sg-regs.h
@@ -11,6 +11,7 @@
 #define UNIPHIER_SG_REGS_H
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <linux/compiler.h>
 #ifdef CONFIG_ARCH_UNIPHIER_V8_MULTI
 extern void __iomem *sg_base;
diff --git a/arch/arm/mach-versal/include/mach/hardware.h b/arch/arm/mach-versal/include/mach/hardware.h
index 9af5afd3f3f..64b858e79db 100644
--- a/arch/arm/mach-versal/include/mach/hardware.h
+++ b/arch/arm/mach-versal/include/mach/hardware.h
@@ -4,6 +4,7 @@
  */
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/mach-versal/include/mach/sys_proto.h b/arch/arm/mach-versal/include/mach/sys_proto.h
index 31af049a21c..1f4dc80d8fd 100644
--- a/arch/arm/mach-versal/include/mach/sys_proto.h
+++ b/arch/arm/mach-versal/include/mach/sys_proto.h
@@ -3,6 +3,7 @@
  * Copyright 2016 - 2018 Xilinx, Inc.
  */
 
+#include <asm/types.h>
 enum {
 	TCM_LOCK,
 	TCM_SPLIT,
diff --git a/arch/arm/mach-versal/mp.c b/arch/arm/mach-versal/mp.c
index 001c3e9518a..0eada1838d4 100644
--- a/arch/arm/mach-versal/mp.c
+++ b/arch/arm/mach-versal/mp.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-versatile/timer.c b/arch/arm/mach-versatile/timer.c
index a0babce7baa..108a86d8919 100644
--- a/arch/arm/mach-versatile/timer.c
+++ b/arch/arm/mach-versatile/timer.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <linux/types.h>
 
 #define TIMER_ENABLE	(1 << 7)
 #define TIMER_MODE_MSK	(1 << 6)
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 188f3803cad..401b06faf34 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index d7933afee41..8c7d482a091 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define ZYNQ_SILICON_VER_MASK	0xF0000000
 #define ZYNQ_SILICON_VER_SHIFT	28
diff --git a/arch/arm/mach-zynq/ddrc.c b/arch/arm/mach-zynq/ddrc.c
index f601c927f1a..bca7d3d62df 100644
--- a/arch/arm/mach-zynq/ddrc.c
+++ b/arch/arm/mach-zynq/ddrc.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #ifndef CONFIG_ZYNQ_DDRC_INIT
diff --git a/arch/arm/mach-zynq/include/mach/hardware.h b/arch/arm/mach-zynq/include/mach/hardware.h
index 89eb565c941..9b9c1e8f2dc 100644
--- a/arch/arm/mach-zynq/include/mach/hardware.h
+++ b/arch/arm/mach-zynq/include/mach/hardware.h
@@ -6,6 +6,7 @@
 #ifndef _ASM_ARCH_HARDWARE_H
 #define _ASM_ARCH_HARDWARE_H
 
+#include <asm/types.h>
 #define ZYNQ_SYS_CTRL_BASEADDR		0xF8000000
 #define ZYNQ_DEV_CFG_APB_BASEADDR	0xF8007000
 #define ZYNQ_SCU_BASEADDR		0xF8F00000
diff --git a/arch/arm/mach-zynq/include/mach/sys_proto.h b/arch/arm/mach-zynq/include/mach/sys_proto.h
index 1dc16d479ea..3451517793b 100644
--- a/arch/arm/mach-zynq/include/mach/sys_proto.h
+++ b/arch/arm/mach-zynq/include/mach/sys_proto.h
@@ -6,6 +6,7 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
+#include <asm/types.h>
 extern void zynq_slcr_lock(void);
 extern void zynq_slcr_unlock(void);
 extern void zynq_slcr_cpu_reset(void);
diff --git a/arch/arm/mach-zynq/ps7_spl_init.c b/arch/arm/mach-zynq/ps7_spl_init.c
index 4c38724d4d7..35314960cfa 100644
--- a/arch/arm/mach-zynq/ps7_spl_init.c
+++ b/arch/arm/mach-zynq/ps7_spl_init.c
@@ -4,6 +4,7 @@
  * (c) Copyright 2016 Topic Embedded Products.
  */
 
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/spl.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index 67df265ba96..30d6aee8bd1 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 9c3ec9a0c3f..a5582083f22 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -13,6 +13,7 @@
 #include <asm/u-boot.h>
 #include <generated/dt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/spl.h>
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index 08cb4406cc3..1854ee35108 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -38,6 +38,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/clk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
index a16c2216a29..7eff158a1cf 100644
--- a/arch/arm/mach-zynqmp-r5/cpu.c
+++ b/arch/arm/mach-zynqmp-r5/cpu.c
@@ -9,6 +9,7 @@
 #include <asm/armv7_mpu.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index 83dfd4f1bd8..122f427e59e 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -11,6 +11,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 892cfb239a0..881080c2a9e 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -19,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define ZYNQ_SILICON_VER_MASK	0xF000
 #define ZYNQ_SILICON_VER_SHIFT	12
diff --git a/arch/arm/mach-zynqmp/handoff.c b/arch/arm/mach-zynqmp/handoff.c
index 64e5320acc6..0318de61a79 100644
--- a/arch/arm/mach-zynqmp/handoff.c
+++ b/arch/arm/mach-zynqmp/handoff.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 /*
  * atfhandoffparams
diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index c5ba42124b0..682b4e32601 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -8,6 +8,7 @@
 #define _ASM_ARCH_HARDWARE_H
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/arch/arm/mach-zynqmp/include/mach/sys_proto.h b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
index 05c81769d63..f874db3f923 100644
--- a/arch/arm/mach-zynqmp/include/mach/sys_proto.h
+++ b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
@@ -8,6 +8,7 @@
 #define _ASM_ARCH_SYS_PROTO_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 #define PAYLOAD_ARG_CNT		5
 
 #define ZYNQMP_CSU_SILICON_VER_MASK	0xF
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index b31da25933e..258cf27323c 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -13,6 +13,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/arch/arm/mach-zynqmp/psu_spl_init.c b/arch/arm/mach-zynqmp/psu_spl_init.c
index 5c5c7d136e7..ddda997165e 100644
--- a/arch/arm/mach-zynqmp/psu_spl_init.c
+++ b/arch/arm/mach-zynqmp/psu_spl_init.c
@@ -5,8 +5,10 @@
  * Michal Simek <michal.simek at xilinx.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/arch/psu_init_gpl.h>
+#include <asm/types.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 e8c2ae57774..8817dd4ae97 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.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 e4c7041c421..b9a6cd51cbf 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5227x/speed.c b/arch/m68k/cpu/mcf5227x/speed.c
index fa9d5cb7887..13f2fa553f8 100644
--- a/arch/m68k/cpu/mcf5227x/speed.c
+++ b/arch/m68k/cpu/mcf5227x/speed.c
@@ -9,6 +9,7 @@
 #include <clock_legacy.h>
 #include <asm/global_data.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index bf3acb8f893..499b6dbc35f 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -17,6 +17,7 @@
 #include <command.h>
 #include <netdev.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 82f5b3c2f80..823221c0ea9 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -26,6 +26,7 @@
 #include <netdev.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "cpu.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/m68k/cpu/mcf52x2/cpu.h b/arch/m68k/cpu/mcf52x2/cpu.h
index 9bba7810e05..2d24333afef 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.h
+++ b/arch/m68k/cpu/mcf52x2/cpu.h
@@ -9,6 +9,7 @@
 #define _CPU_H_
 
 #include <command.h>
+#include <compiler.h>
 
 /* Use this to create board specific reset functions */
 void board_reset(void) __attribute__((__weak__));
diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index b564e75dbd0..9a83e853809 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -23,6 +23,7 @@
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #if defined(CONFIG_CMD_NET)
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 776543f06a9..20ed945a407 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -17,6 +17,7 @@
 #include <command.h>
 #include <netdev.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
index f7d371e37a1..f9dcb7d4b61 100644
--- a/arch/m68k/cpu/mcf532x/cpu_init.c
+++ b/arch/m68k/cpu/mcf532x/cpu_init.c
@@ -14,6 +14,7 @@
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #if defined(CONFIG_MCFFEC)
diff --git a/arch/m68k/cpu/mcf532x/speed.c b/arch/m68k/cpu/mcf532x/speed.c
index e2985792d96..065938701e3 100644
--- a/arch/m68k/cpu/mcf532x/speed.c
+++ b/arch/m68k/cpu/mcf532x/speed.c
@@ -12,6 +12,7 @@
 #include <clock_legacy.h>
 #include <asm/global_data.h>
 #include <asm/processor.h>
+#include <asm/types.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 aa9af8a5a2a..70bf764abb2 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -17,6 +17,7 @@
 #include <command.h>
 #include <netdev.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 7610e03fa5f..10c9f635c26 100644
--- a/arch/m68k/cpu/mcf5445x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5445x/cpu_init.c
@@ -16,6 +16,7 @@
 #include <asm/processor.h>
 #include <asm/rtc.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 
diff --git a/arch/m68k/cpu/mcf5445x/pci.c b/arch/m68k/cpu/mcf5445x/pci.c
index af02c4934c9..9868ece5cc2 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 <asm/types.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_PCI)
diff --git a/arch/m68k/cpu/mcf5445x/speed.c b/arch/m68k/cpu/mcf5445x/speed.c
index a0b9af8866b..b2e373f9e1a 100644
--- a/arch/m68k/cpu/mcf5445x/speed.c
+++ b/arch/m68k/cpu/mcf5445x/speed.c
@@ -9,6 +9,7 @@
 #include <clock_legacy.h>
 #include <asm/global_data.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index e1a7f360e77..b99e16a213e 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -17,6 +17,7 @@
 #include <command.h>
 #include <netdev.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 20443e81835..ac8b4df3b63 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
@@ -14,6 +14,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #if defined(CONFIG_CMD_NET)
diff --git a/arch/m68k/cpu/mcf547x_8x/pci.c b/arch/m68k/cpu/mcf547x_8x/pci.c
index 74ba68124f1..d83ad111cef 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 <asm/types.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_PCI)
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 49f246b62e1..9439f51ebfe 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -10,6 +10,7 @@
 #include <time.h>
 #include <asm/global_data.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/timer.h>
 #include <asm/immap.h>
diff --git a/arch/m68k/include/asm/coldfire/ata.h b/arch/m68k/include/asm/coldfire/ata.h
index d85c052c2eb..6cc7b373303 100644
--- a/arch/m68k/include/asm/coldfire/ata.h
+++ b/arch/m68k/include/asm/coldfire/ata.h
@@ -10,6 +10,7 @@
 #define __ATA_H__
 
 /* ATA */
+#include <asm/types.h>
 typedef struct atac {
 	/* PIO */
 	u8 toff;		/* 0x00 */
diff --git a/arch/m68k/include/asm/coldfire/crossbar.h b/arch/m68k/include/asm/coldfire/crossbar.h
index e26da133725..eb1dd3ee013 100644
--- a/arch/m68k/include/asm/coldfire/crossbar.h
+++ b/arch/m68k/include/asm/coldfire/crossbar.h
@@ -12,6 +12,7 @@
 /*********************************************************************
 * Cross-bar switch (XBS)
 *********************************************************************/
+#include <asm/types.h>
 typedef struct xbs {
 	u32 prs1;		/* 0x100 Priority Register Slave 1 */
 	u32 res1[3];		/* 0x104 - 0F */
diff --git a/arch/m68k/include/asm/coldfire/dspi.h b/arch/m68k/include/asm/coldfire/dspi.h
index ddd8f338054..5c08bcb6f1c 100644
--- a/arch/m68k/include/asm/coldfire/dspi.h
+++ b/arch/m68k/include/asm/coldfire/dspi.h
@@ -10,6 +10,7 @@
 #define __DSPI_H__
 
 /* DMA Serial Peripheral Interface (DSPI) */
+#include <asm/types.h>
 typedef struct dspi {
 	u32 mcr;	/* 0x00 */
 	u32 resv0;	/* 0x04 */
diff --git a/arch/m68k/include/asm/coldfire/edma.h b/arch/m68k/include/asm/coldfire/edma.h
index a89d02ab210..8d86e30e573 100644
--- a/arch/m68k/include/asm/coldfire/edma.h
+++ b/arch/m68k/include/asm/coldfire/edma.h
@@ -14,6 +14,7 @@
 *********************************************************************/
 
 /* eDMA module registers */
+#include <asm/types.h>
 typedef struct edma_ctrl {
 	u32 cr;			/* 0x00 Control Register */
 	u32 es;			/* 0x04 Error Status Register */
diff --git a/arch/m68k/include/asm/coldfire/eport.h b/arch/m68k/include/asm/coldfire/eport.h
index 0e64bef5ed6..c8f67c6bd66 100644
--- a/arch/m68k/include/asm/coldfire/eport.h
+++ b/arch/m68k/include/asm/coldfire/eport.h
@@ -10,6 +10,7 @@
 #define __EPORT_H__
 
 /* Edge Port Module (EPORT) */
+#include <asm/types.h>
 typedef struct eport {
 #ifdef CONFIG_MCF547x_8x
 	u16 par;	/* 0x00 */
diff --git a/arch/m68k/include/asm/coldfire/flexbus.h b/arch/m68k/include/asm/coldfire/flexbus.h
index c47787a87e7..0be751bec13 100644
--- a/arch/m68k/include/asm/coldfire/flexbus.h
+++ b/arch/m68k/include/asm/coldfire/flexbus.h
@@ -91,6 +91,7 @@ typedef struct fbcs {
 } fbcs_t;
 #endif
 
+#include <asm/types.h>
 #define FBCS_CSAR_BA(x)			((x) & 0xFFFF0000)
 
 #define FBCS_CSMR_BAM(x)		(((x) & 0xFFFF) << 16)
diff --git a/arch/m68k/include/asm/coldfire/flexcan.h b/arch/m68k/include/asm/coldfire/flexcan.h
index 7d8e9e269b6..6604e3502d3 100644
--- a/arch/m68k/include/asm/coldfire/flexcan.h
+++ b/arch/m68k/include/asm/coldfire/flexcan.h
@@ -10,6 +10,7 @@
 #define __FLEXCAN_H__
 
 /* FlexCan Message Buffer */
+#include <asm/types.h>
 typedef struct can_msgbuf_ctrl {
 #ifdef CONFIG_M5282
 	u8 tmstamp;		/* 0x00 Timestamp */
diff --git a/arch/m68k/include/asm/coldfire/intctrl.h b/arch/m68k/include/asm/coldfire/intctrl.h
index 7b42e65bc82..1f80a593446 100644
--- a/arch/m68k/include/asm/coldfire/intctrl.h
+++ b/arch/m68k/include/asm/coldfire/intctrl.h
@@ -15,6 +15,7 @@
 #	define	CONFIG_SYS_CF_INTC_REG1
 #endif
 
+#include <asm/types.h>
 typedef struct int0_ctrl {
 	/* Interrupt Controller 0 */
 	u32 iprh0;		/* 0x00 Pending High */
diff --git a/arch/m68k/include/asm/coldfire/lcd.h b/arch/m68k/include/asm/coldfire/lcd.h
index a347bed8382..e3124fc8b4f 100644
--- a/arch/m68k/include/asm/coldfire/lcd.h
+++ b/arch/m68k/include/asm/coldfire/lcd.h
@@ -10,6 +10,7 @@
 #define __LCDC_H__
 
 /* LCD module registers */
+#include <asm/types.h>
 typedef struct lcd_ctrl {
 	u32 ssar;		/* 0x00 Screen Start Address Register */
 	u32 sr;			/* 0x04 LCD Size Register */
diff --git a/arch/m68k/include/asm/coldfire/mdha.h b/arch/m68k/include/asm/coldfire/mdha.h
index be3dae972ab..647a246b9eb 100644
--- a/arch/m68k/include/asm/coldfire/mdha.h
+++ b/arch/m68k/include/asm/coldfire/mdha.h
@@ -10,6 +10,7 @@
 #define __MDHA_H__
 
 /* Message Digest Hardware Accelerator */
+#include <asm/types.h>
 typedef struct mdha_ctrl {
 	u32 mr;			/* 0x00 MDHA Mode */
 	u32 cr;			/* 0x04 Control */
diff --git a/arch/m68k/include/asm/coldfire/pwm.h b/arch/m68k/include/asm/coldfire/pwm.h
index 1b83acfe37b..570d110b737 100644
--- a/arch/m68k/include/asm/coldfire/pwm.h
+++ b/arch/m68k/include/asm/coldfire/pwm.h
@@ -10,6 +10,7 @@
 #define __ATA_H__
 
 /* Pulse Width Modulation (PWM) */
+#include <asm/types.h>
 typedef struct pwm_ctrl {
 #ifdef CONFIG_M5272
 	u8 cr0;
diff --git a/arch/m68k/include/asm/coldfire/qspi.h b/arch/m68k/include/asm/coldfire/qspi.h
index dd4565ae96e..13d7b9d364b 100644
--- a/arch/m68k/include/asm/coldfire/qspi.h
+++ b/arch/m68k/include/asm/coldfire/qspi.h
@@ -10,6 +10,7 @@
 #define __QSPI_H__
 
 /* QSPI module registers */
+#include <asm/types.h>
 typedef struct qspi_ctrl {
 	u16 mr;			/* 0x00 Mode */
 	u16 res1;
diff --git a/arch/m68k/include/asm/coldfire/rng.h b/arch/m68k/include/asm/coldfire/rng.h
index 88124e36e2e..2b3b8d26dc2 100644
--- a/arch/m68k/include/asm/coldfire/rng.h
+++ b/arch/m68k/include/asm/coldfire/rng.h
@@ -10,6 +10,7 @@
 #define __RNG_H__
 
 /* Random Number Generator */
+#include <asm/types.h>
 typedef struct rng_ctrl {
 	u32 cr;			/* 0x00 Control */
 	u32 sr;			/* 0x04 Status */
diff --git a/arch/m68k/include/asm/coldfire/skha.h b/arch/m68k/include/asm/coldfire/skha.h
index 3b48dc970c9..d6168e186da 100644
--- a/arch/m68k/include/asm/coldfire/skha.h
+++ b/arch/m68k/include/asm/coldfire/skha.h
@@ -9,6 +9,7 @@
 #ifndef __SKHA_H__
 #define __SKHA_H__
 
+#include <asm/types.h>
 typedef struct skha_ctrl {
 	u32 mr;			/* 0x00 Mode */
 	u32 cr;			/* 0x04 Control */
diff --git a/arch/m68k/include/asm/coldfire/ssi.h b/arch/m68k/include/asm/coldfire/ssi.h
index 900d6bdcf65..01167cb5caa 100644
--- a/arch/m68k/include/asm/coldfire/ssi.h
+++ b/arch/m68k/include/asm/coldfire/ssi.h
@@ -9,6 +9,7 @@
 #ifndef __SSI_H__
 #define __SSI_H__
 
+#include <asm/types.h>
 typedef struct ssi {
 	u32 tx0;
 	u32 tx1;
diff --git a/arch/m68k/include/asm/fec.h b/arch/m68k/include/asm/fec.h
index cdb8119d3ea..7f1c34ebd15 100644
--- a/arch/m68k/include/asm/fec.h
+++ b/arch/m68k/include/asm/fec.h
@@ -15,6 +15,7 @@
 #define	fec_h
 
 #include <phy.h>
+#include <linux/types.h>
 
 /* Buffer descriptors used FEC.
 */
diff --git a/arch/m68k/include/asm/fsl_mcdmafec.h b/arch/m68k/include/asm/fsl_mcdmafec.h
index de6c548fafd..fdc4fd7daf7 100644
--- a/arch/m68k/include/asm/fsl_mcdmafec.h
+++ b/arch/m68k/include/asm/fsl_mcdmafec.h
@@ -11,6 +11,7 @@
 
 /* Re-use of the definitions */
 #include <asm/fec.h>
+#include <linux/types.h>
 
 typedef struct fecdma {
 	u32 rsvd0;		/* 0x000 */
diff --git a/arch/m68k/include/asm/immap_520x.h b/arch/m68k/include/asm/immap_520x.h
index bb1237453ff..f4db2666d48 100644
--- a/arch/m68k/include/asm/immap_520x.h
+++ b/arch/m68k/include/asm/immap_520x.h
@@ -42,6 +42,7 @@
 #include <asm/coldfire/flexbus.h>
 #include <asm/coldfire/intctrl.h>
 #include <asm/coldfire/qspi.h>
+#include <asm/types.h>
 
 /* System Controller Module */
 typedef struct scm1 {
diff --git a/arch/m68k/include/asm/immap_5227x.h b/arch/m68k/include/asm/immap_5227x.h
index 710d6f5c0dd..e75f4c2d253 100644
--- a/arch/m68k/include/asm/immap_5227x.h
+++ b/arch/m68k/include/asm/immap_5227x.h
@@ -59,6 +59,7 @@
 #include <asm/coldfire/lcd.h>
 #include <asm/coldfire/pwm.h>
 #include <asm/coldfire/ssi.h>
+#include <asm/types.h>
 
 /* Reset Controller Module (RCM) */
 typedef struct rcm {
diff --git a/arch/m68k/include/asm/immap_5235.h b/arch/m68k/include/asm/immap_5235.h
index 27d905ef941..3fbca550209 100644
--- a/arch/m68k/include/asm/immap_5235.h
+++ b/arch/m68k/include/asm/immap_5235.h
@@ -54,6 +54,7 @@
 #include <asm/coldfire/qspi.h>
 #include <asm/coldfire/rng.h>
 #include <asm/coldfire/skha.h>
+#include <asm/types.h>
 
 /* System Control Module register */
 typedef struct scm_ctrl {
diff --git a/arch/m68k/include/asm/immap_5272.h b/arch/m68k/include/asm/immap_5272.h
index cd7b67256cf..9b6d5cd04ad 100644
--- a/arch/m68k/include/asm/immap_5272.h
+++ b/arch/m68k/include/asm/immap_5272.h
@@ -28,6 +28,7 @@
 #define MMAP_USB	(CONFIG_SYS_MBAR + 0x00001000)
 
 #include <asm/coldfire/pwm.h>
+#include <linux/types.h>
 
 /* System configuration registers */
 typedef struct sys_ctrl {
diff --git a/arch/m68k/include/asm/immap_5275.h b/arch/m68k/include/asm/immap_5275.h
index 8b1a08b4f24..90a39a83b2f 100644
--- a/arch/m68k/include/asm/immap_5275.h
+++ b/arch/m68k/include/asm/immap_5275.h
@@ -57,6 +57,7 @@
 #include <asm/coldfire/qspi.h>
 #include <asm/coldfire/rng.h>
 #include <asm/coldfire/skha.h>
+#include <asm/types.h>
 
 /* System configuration registers
 */
diff --git a/arch/m68k/include/asm/immap_5282.h b/arch/m68k/include/asm/immap_5282.h
index d7c68f5749a..20c551de131 100644
--- a/arch/m68k/include/asm/immap_5282.h
+++ b/arch/m68k/include/asm/immap_5282.h
@@ -50,6 +50,7 @@
 #include <asm/coldfire/flexcan.h>
 #include <asm/coldfire/intctrl.h>
 #include <asm/coldfire/qspi.h>
+#include <linux/types.h>
 
 /* System Control Module */
 typedef struct scm_ctrl {
diff --git a/arch/m68k/include/asm/immap_5301x.h b/arch/m68k/include/asm/immap_5301x.h
index 29e60863bfd..3500a09e0e1 100644
--- a/arch/m68k/include/asm/immap_5301x.h
+++ b/arch/m68k/include/asm/immap_5301x.h
@@ -59,6 +59,7 @@
 #include <asm/coldfire/ssi.h>
 #include <asm/coldfire/rng.h>
 #include <asm/rtc.h>
+#include <asm/types.h>
 
 /* System Controller Module */
 typedef struct scm1 {
diff --git a/arch/m68k/include/asm/immap_5307.h b/arch/m68k/include/asm/immap_5307.h
index e041e7e0afb..b01a1e6243d 100644
--- a/arch/m68k/include/asm/immap_5307.h
+++ b/arch/m68k/include/asm/immap_5307.h
@@ -7,6 +7,7 @@
 #ifndef __IMMAP_5307__
 #define __IMMAP_5307__
 
+#include <asm/types.h>
 #define MMAP_SIM	(CONFIG_SYS_MBAR + 0x00000000)
 #define MMAP_INTC	(CONFIG_SYS_MBAR + 0x00000040)
 #define MMAP_CSM	(CONFIG_SYS_MBAR + 0x00000080)
diff --git a/arch/m68k/include/asm/immap_5329.h b/arch/m68k/include/asm/immap_5329.h
index dbf3a2260ee..460d2c2fdf0 100644
--- a/arch/m68k/include/asm/immap_5329.h
+++ b/arch/m68k/include/asm/immap_5329.h
@@ -63,6 +63,7 @@
 #include <asm/coldfire/pwm.h>
 #include <asm/coldfire/ssi.h>
 #include <asm/coldfire/skha.h>
+#include <asm/types.h>
 
 /* System control module registers */
 typedef struct scm1_ctrl {
diff --git a/arch/m68k/include/asm/immap_5441x.h b/arch/m68k/include/asm/immap_5441x.h
index 708d0db755a..c4e61b75171 100644
--- a/arch/m68k/include/asm/immap_5441x.h
+++ b/arch/m68k/include/asm/immap_5441x.h
@@ -84,6 +84,7 @@
 #include <asm/coldfire/flexcan.h>
 #include <asm/coldfire/intctrl.h>
 #include <asm/coldfire/ssi.h>
+#include <asm/types.h>
 
 /* Serial Boot Facility (SBF) */
 typedef struct sbf {
diff --git a/arch/m68k/include/asm/immap_5445x.h b/arch/m68k/include/asm/immap_5445x.h
index 3111d00d3ee..76e8d2dc0a9 100644
--- a/arch/m68k/include/asm/immap_5445x.h
+++ b/arch/m68k/include/asm/immap_5445x.h
@@ -60,6 +60,7 @@
 #include <asm/coldfire/flexbus.h>
 #include <asm/coldfire/intctrl.h>
 #include <asm/coldfire/ssi.h>
+#include <asm/types.h>
 
 /* Watchdog Timer Modules (WTM) */
 typedef struct wtm {
diff --git a/arch/m68k/include/asm/immap_547x_8x.h b/arch/m68k/include/asm/immap_547x_8x.h
index 5e1345684de..8dee82e9e50 100644
--- a/arch/m68k/include/asm/immap_547x_8x.h
+++ b/arch/m68k/include/asm/immap_547x_8x.h
@@ -45,6 +45,7 @@
 #include <asm/coldfire/flexbus.h>
 #include <asm/coldfire/flexcan.h>
 #include <asm/coldfire/intctrl.h>
+#include <asm/types.h>
 
 typedef struct siu {
 	u32 mbar;		/* 0x00 */
diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h
index 35ad4a1c044..95fcddb075e 100644
--- a/arch/m68k/include/asm/io.h
+++ b/arch/m68k/include/asm/io.h
@@ -10,6 +10,7 @@
 #define __ASM_M68K_IO_H__
 
 #include <asm/byteorder.h>
+#include <asm/types.h>
 
 #ifndef _IO_BASE
 #define _IO_BASE 0
diff --git a/arch/m68k/include/asm/m5282.h b/arch/m68k/include/asm/m5282.h
index 0c91cf491e2..261f49fdf20 100644
--- a/arch/m68k/include/asm/m5282.h
+++ b/arch/m68k/include/asm/m5282.h
@@ -11,6 +11,7 @@
 * PLL Clock Module
 *********************************************************************/
 /* Bit definitions and macros for PLL_SYNCR */
+#include <linux/types.h>
 #define PLL_SYNCR_LOLRE			(0x8000)
 #define PLL_SYNCR_MFD2			(0x4000)
 #define PLL_SYNCR_MFD1			(0x2000)
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h
index d419824806c..a17708195ea 100644
--- a/arch/m68k/include/asm/ptrace.h
+++ b/arch/m68k/include/asm/ptrace.h
@@ -9,6 +9,7 @@
  */
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 struct pt_regs {
 	ulong d0;
 	ulong d1;
diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h
index 1fb492c76e1..544fa821571 100644
--- a/arch/m68k/include/asm/rtc.h
+++ b/arch/m68k/include/asm/rtc.h
@@ -10,6 +10,7 @@
 #define __MCFRTC_H__
 
 /* Real time Clock */
+#include <asm/types.h>
 typedef struct rtc_ctrl {
 	u32 hourmin;		/* 0x00 Hours and Minutes Counter Register */
 	u32 seconds;		/* 0x04 Seconds Counter Register */
diff --git a/arch/m68k/include/asm/timer.h b/arch/m68k/include/asm/timer.h
index 982d71a542e..47b75989633 100644
--- a/arch/m68k/include/asm/timer.h
+++ b/arch/m68k/include/asm/timer.h
@@ -12,6 +12,7 @@
 /****************************************************************************/
 
 /****************************************************************************/
+#include <asm/types.h>
 /* Timer structure */
 /****************************************************************************/
 /* DMA Timer module registers */
diff --git a/arch/m68k/include/asm/uart.h b/arch/m68k/include/asm/uart.h
index e4a9650a03c..2a41f7e507e 100644
--- a/arch/m68k/include/asm/uart.h
+++ b/arch/m68k/include/asm/uart.h
@@ -12,6 +12,7 @@
 /****************************************************************************/
 
 /* UART module registers */
+#include <asm/types.h>
 /* Register read/write struct */
 typedef struct uart {
 	u8 umr;			/* 0x00 Mode Register */
diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c
index da4ad9049bd..e24e7424400 100644
--- a/arch/m68k/lib/bdinfo.c
+++ b/arch/m68k/lib/bdinfo.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 20ff33f7532..c70b24944e6 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c
index 22048d12d70..afd8e3531d7 100644
--- a/arch/m68k/lib/cache.c
+++ b/arch/m68k/lib/cache.c
@@ -5,10 +5,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/immap.h>
 #include <asm/cache.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 volatile int *cf_icache_status = (int *)ICACHE_STATUS;
 volatile int *cf_dcache_status = (int *)DCACHE_STATUS;
diff --git a/arch/m68k/lib/fec.c b/arch/m68k/lib/fec.c
index 4f013238928..053ced25452 100644
--- a/arch/m68k/lib/fec.c
+++ b/arch/m68k/lib/fec.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index cbe29e72a86..36056d25ebb 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <asm/global_data.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/timer.h>
 #include <asm/immap.h>
diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c
index 3591bb22f09..60b8fa20b94 100644
--- a/arch/m68k/lib/traps.c
+++ b/arch/m68k/lib/traps.c
@@ -15,6 +15,7 @@
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 
 extern void _exc_handler(void);
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index aa832d6be6d..20dea1abbee 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <asm/asm.h>
 #include <asm/cache.h>
+#include <linux/types.h>
 
 int dcache_status(void)
 {
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index e86f0cda9df..56ac0c50a87 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/microblaze_intc.h>
 #include <asm/asm.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index 9f25c2f3952..87eea372539 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 bool boot_linux;
 
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index eb53f0edcdd..fc22d56aa4a 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -16,6 +16,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index f8835b591c6..09fc6438b8b 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -21,6 +21,7 @@
 #include <asm/cache.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c
index 7d5c9fd83ae..bfce17fd36c 100644
--- a/arch/mips/cpu/cpu.c
+++ b/arch/mips/cpu/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <init.h>
 #include <linux/compiler.h>
 #include <asm/cache.h>
diff --git a/arch/mips/cpu/time.c b/arch/mips/cpu/time.c
index aab92ec859b..764b74ce970 100644
--- a/arch/mips/cpu/time.c
+++ b/arch/mips/cpu/time.c
@@ -8,6 +8,7 @@
 #include <compiler.h>
 #include <time.h>
 #include <asm/mipsregs.h>
+#include <linux/types.h>
 
 unsigned long notrace timer_read_counter(void)
 {
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h
index 641e2ad58de..abb3c5018ea 100644
--- a/arch/mips/include/asm/cacheops.h
+++ b/arch/mips/include/asm/cacheops.h
@@ -12,6 +12,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 static inline void mips_cache(int op, const volatile void *addr)
 {
 #ifdef __GCC_HAVE_BUILTIN_MIPS_CACHE
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 836cd436872..71f6d2da990 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -9,6 +9,7 @@
 #ifndef _ASM_IO_H
 #define _ASM_IO_H
 
+#include <compiler.h>
 #include <linux/bug.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
diff --git a/arch/mips/include/asm/mach-generic/ioremap.h b/arch/mips/include/asm/mach-generic/ioremap.h
index d6258f5bce5..a9cfee53c15 100644
--- a/arch/mips/include/asm/mach-generic/ioremap.h
+++ b/arch/mips/include/asm/mach-generic/ioremap.h
@@ -2,6 +2,7 @@
 #ifndef __ASM_MACH_GENERIC_IOREMAP_H
 #define __ASM_MACH_GENERIC_IOREMAP_H
 
+#include <compiler.h>
 #include <linux/types.h>
 
 /*
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index e65485b4fff..fecd7e7de40 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -32,6 +32,7 @@
 #else
 #define _ULCAST_ (unsigned long)
 #define _U64CAST_ (u64)
+#include <asm/types.h>
 #endif
 
 /*
diff --git a/arch/mips/include/asm/pgtable-bits.h b/arch/mips/include/asm/pgtable-bits.h
index 481d2ef6c2f..1d20cde07ed 100644
--- a/arch/mips/include/asm/pgtable-bits.h
+++ b/arch/mips/include/asm/pgtable-bits.h
@@ -146,6 +146,7 @@
 #define _PAGE_READ		(cpu_has_rixi ? 0 : (1 << _PAGE_READ_SHIFT))
 #define _PAGE_NO_READ_SHIFT	_PAGE_READ_SHIFT
 #define _PAGE_NO_READ		(cpu_has_rixi ? (1 << _PAGE_READ_SHIFT) : 0)
+#include <linux/types.h>
 #endif	/* defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) */
 
 #if defined(_PAGE_NO_READ_SHIFT)
diff --git a/arch/mips/include/asm/sections.h b/arch/mips/include/asm/sections.h
index 93c30e9724f..1b1897510af 100644
--- a/arch/mips/include/asm/sections.h
+++ b/arch/mips/include/asm/sections.h
@@ -7,6 +7,7 @@
 #define __ASM_MIPS_SECTIONS_H
 
 #include <asm-generic/sections.h>
+#include <linux/types.h>
 
 /**
  * __rel_start: Relocation data generated by the mips-relocs tool
diff --git a/arch/mips/lib/boot.c b/arch/mips/lib/boot.c
index 53e8cccad47..a6655c6188e 100644
--- a/arch/mips/lib/boot.c
+++ b/arch/mips/lib/boot.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 8745ee351e5..471cc48539c 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index 7be0b559561..9cdac4f5245 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -5,7 +5,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/cacheops.h>
@@ -16,6 +18,7 @@
 #include <asm/system.h>
 #include <linux/bug.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index d6ea2f5730d..edb6b611377 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -35,6 +35,7 @@
 #include <asm/sections.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * read_uint() - Read an unsigned integer from the buffer
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 8b16ee056e3..c20fed9b438 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -23,6 +23,7 @@
 #include <asm/system.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/mach-ath79/ar933x/clk.c b/arch/mips/mach-ath79/ar933x/clk.c
index 6b3cbdd0e57..b0d5cc8bbfb 100644
--- a/arch/mips/mach-ath79/ar933x/clk.c
+++ b/arch/mips/mach-ath79/ar933x/clk.c
@@ -5,11 +5,13 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 09166ecf8f0..3ab0199fe10 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 5ce5ea5ba46..69f20939a74 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <compiler.h>
 #include <hang.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -16,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 #include <wait_bit.h>
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 9df48b97ef4..e626ffa7254 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/arch/mips/mach-ath79/cpu.c b/arch/mips/mach-ath79/cpu.c
index 55d051f8cb9..d18b239d1b0 100644
--- a/arch/mips/mach-ath79/cpu.c
+++ b/arch/mips/mach-ath79/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
diff --git a/arch/mips/mach-ath79/qca953x/clk.c b/arch/mips/mach-ath79/qca953x/clk.c
index 6e8a4c0d194..f1177cdfc3d 100644
--- a/arch/mips/mach-ath79/qca953x/clk.c
+++ b/arch/mips/mach-ath79/qca953x/clk.c
@@ -5,11 +5,13 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index 78f2370e09c..36a9eeb18bd 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c
index 996f846c480..7374c98e59a 100644
--- a/arch/mips/mach-ath79/qca956x/clk.c
+++ b/arch/mips/mach-ath79/qca956x/clk.c
@@ -5,12 +5,14 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 #include <wait_bit.h>
diff --git a/arch/mips/mach-ath79/qca956x/ddr.c b/arch/mips/mach-ath79/qca956x/ddr.c
index f9cf8daa224..8231c142de3 100644
--- a/arch/mips/mach-ath79/qca956x/ddr.c
+++ b/arch/mips/mach-ath79/qca956x/ddr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 6ecde8a39ff..d4d6b02808c 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/arch/mips/mach-bmips/include/ioremap.h b/arch/mips/mach-bmips/include/ioremap.h
index 99ea03e6a70..fea55d8287a 100644
--- a/arch/mips/mach-bmips/include/ioremap.h
+++ b/arch/mips/mach-bmips/include/ioremap.h
@@ -2,6 +2,7 @@
 #ifndef __ASM_MACH_BMIPS_IOREMAP_H
 #define __ASM_MACH_BMIPS_IOREMAP_H
 
+#include <compiler.h>
 #include <linux/types.h>
 
 /*
diff --git a/arch/mips/mach-jz47xx/include/mach/jz4780.h b/arch/mips/mach-jz47xx/include/mach/jz4780.h
index 4422e503ed2..6f75b38901f 100644
--- a/arch/mips/mach-jz47xx/include/mach/jz4780.h
+++ b/arch/mips/mach-jz47xx/include/mach/jz4780.h
@@ -82,6 +82,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <compiler.h>
+#include <linux/types.h>
 u32 sdram_size(int bank);
 
 const u32 jz4780_clk_get_efuse_clk(void);
diff --git a/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h b/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
index 61cc1489889..4ac0d61f5d1 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 <asm/types.h>
 #include <linux/bitops.h>
 #define DDRC_ST				0x0
 #define DDRC_CFG			0x4
diff --git a/arch/mips/mach-jz47xx/jz4780/gpio.c b/arch/mips/mach-jz47xx/jz4780/gpio.c
index d4884e7fa9f..1787de5fe4c 100644
--- a/arch/mips/mach-jz47xx/jz4780/gpio.c
+++ b/arch/mips/mach-jz47xx/jz4780/gpio.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index 496016724d7..034aa7593d3 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -18,6 +18,7 @@
 #include <asm/sections.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
 #include <mmc.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/pll.c b/arch/mips/mach-jz47xx/jz4780/pll.c
index ac76a507355..e839db78df8 100644
--- a/arch/mips/mach-jz47xx/jz4780/pll.c
+++ b/arch/mips/mach-jz47xx/jz4780/pll.c
@@ -6,10 +6,12 @@
  * Author: Paul Burton <paul.burton at imgtec.com>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/reset.c b/arch/mips/mach-jz47xx/jz4780/reset.c
index bf6addccb5d..ef0f77b43c8 100644
--- a/arch/mips/mach-jz47xx/jz4780/reset.c
+++ b/arch/mips/mach-jz47xx/jz4780/reset.c
@@ -6,6 +6,7 @@
  * Author: Paul Burton <paul.burton at imgtec.com>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
index 690f3c5601d..c0d69aa455e 100644
--- a/arch/mips/mach-jz47xx/jz4780/sdram.c
+++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
@@ -10,9 +10,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <init.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
index 82bb9e8c3bf..aadbe040921 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -6,6 +6,7 @@
  * Author: Paul Burton <paul.burton at imgtec.com>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <div64.h>
@@ -16,6 +17,7 @@
 #include <asm/mipsregs.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include <mach/jz4780.h>
 
 #define TCU_TSR		0x1C	/* Timer Stop Register */
diff --git a/arch/mips/mach-mscc/gpio.c b/arch/mips/mach-mscc/gpio.c
index d6b4c5d7684..cbc74dd6602 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 <asm/types.h>
 #include <linux/bitops.h>
 
 void mscc_gpio_set_alternate(int gpio, int mode)
diff --git a/arch/mips/mach-mscc/include/ioremap.h b/arch/mips/mach-mscc/include/ioremap.h
index 9024364a57f..d5fc97ba8fa 100644
--- a/arch/mips/mach-mscc/include/ioremap.h
+++ b/arch/mips/mach-mscc/include/ioremap.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_MACH_MSCC_IOREMAP_H
 #define __ASM_MACH_MSCC_IOREMAP_H
 
+#include <compiler.h>
 #include <linux/types.h>
 #include <mach/common.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/common.h b/arch/mips/mach-mscc/include/mach/common.h
index 8f9a9c280b4..e701d325d1c 100644
--- a/arch/mips/mach-mscc/include/mach/common.h
+++ b/arch/mips/mach-mscc/include/mach/common.h
@@ -45,6 +45,7 @@
 /* Common utility functions */
 
 /*
+#include <asm/types.h>
  * Perform a number of NOP instructions, blocks of 8 instructions.
  * The (inlined) function will not affect cache or processor state.
  */
diff --git a/arch/mips/mach-mscc/include/mach/ddr.h b/arch/mips/mach-mscc/include/mach/ddr.h
index 8c1f14773ec..d4461d74e30 100644
--- a/arch/mips/mach-mscc/include/mach/ddr.h
+++ b/arch/mips/mach-mscc/include/mach/ddr.h
@@ -6,10 +6,12 @@
 #ifndef __ASM_MACH_DDR_H
 #define __ASM_MACH_DDR_H
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/cacheops.h>
 #include <asm/io.h>
 #include <asm/reboot.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <mach/common.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2.h b/arch/mips/mach-mscc/include/mach/jr2/jr2.h
index 67244f63fad..121d44b2d6e 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_JR2_H_
 #define _MSCC_JR2_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton.h b/arch/mips/mach-mscc/include/mach/luton/luton.h
index 19f02ede666..b6c9dd43489 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_OCELOT_H_
 #define _MSCC_OCELOT_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot.h
index 2cb2135d374..c45507759ee 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_OCELOT_H_
 #define _MSCC_OCELOT_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval.h b/arch/mips/mach-mscc/include/mach/serval/serval.h
index 763d18fe629..3397441caca 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_SERVAL_H_
 #define _MSCC_SERVAL_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt.h b/arch/mips/mach-mscc/include/mach/servalt/servalt.h
index 9015bc7dad9..e5948997c1c 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_SERVALT_H_
 #define _MSCC_SERVALT_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/include/mach/tlb.h b/arch/mips/mach-mscc/include/mach/tlb.h
index ebd8ad0dc1a..18266b14dc6 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 <asm/types.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 83d3e5bdd28..acfe6bb131b 100644
--- a/arch/mips/mach-mscc/phy.c
+++ b/arch/mips/mach-mscc/phy.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 int mscc_phy_rd_wr(u8 read,
 		   u32 miimdev,
diff --git a/arch/mips/mach-mscc/reset.c b/arch/mips/mach-mscc/reset.c
index a1214573b51..6bd5da4ef67 100644
--- a/arch/mips/mach-mscc/reset.c
+++ b/arch/mips/mach-mscc/reset.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-mtmips/ddr_cal.c b/arch/mips/mach-mtmips/ddr_cal.c
index 1f2f12879b2..1b0cd2fc6d8 100644
--- a/arch/mips/mach-mtmips/ddr_cal.c
+++ b/arch/mips/mach-mtmips/ddr_cal.c
@@ -6,9 +6,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/addrspace.h>
 #include <asm/cacheops.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
diff --git a/arch/mips/mach-mtmips/ddr_init.c b/arch/mips/mach-mtmips/ddr_init.c
index 6c6d0933f2e..290355f538e 100644
--- a/arch/mips/mach-mtmips/ddr_init.c
+++ b/arch/mips/mach-mtmips/ddr_init.c
@@ -6,10 +6,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <mach/ddr.h>
 #include <mach/mc.h>
 
diff --git a/arch/mips/mach-mtmips/include/mach/ddr.h b/arch/mips/mach-mtmips/include/mach/ddr.h
index f92198137b1..e0ecb42726e 100644
--- a/arch/mips/mach-mtmips/include/mach/ddr.h
+++ b/arch/mips/mach-mtmips/include/mach/ddr.h
@@ -8,6 +8,7 @@
 #ifndef _MTMIPS_DDR_H_
 #define _MTMIPS_DDR_H_
 
+#include <compiler.h>
 #include <linux/io.h>
 #include <linux/types.h>
 
diff --git a/arch/mips/mach-mtmips/mt7628/ddr.c b/arch/mips/mach-mtmips/mt7628/ddr.c
index b091f2ecffc..c63f7bcb4e4 100644
--- a/arch/mips/mach-mtmips/mt7628/ddr.c
+++ b/arch/mips/mach-mtmips/mt7628/ddr.c
@@ -6,8 +6,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/addrspace.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
diff --git a/arch/mips/mach-mtmips/mt7628/init.c b/arch/mips/mach-mtmips/mt7628/init.c
index 8bf918b3f25..4c2623a360f 100644
--- a/arch/mips/mach-mtmips/mt7628/init.c
+++ b/arch/mips/mach-mtmips/mt7628/init.c
@@ -15,6 +15,7 @@
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt7628-clk.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include "mt7628.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/mach-mtmips/mt7628/serial.c b/arch/mips/mach-mtmips/mt7628/serial.c
index a7d324792d7..17793927ed7 100644
--- a/arch/mips/mach-mtmips/mt7628/serial.c
+++ b/arch/mips/mach-mtmips/mt7628/serial.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include "mt7628.h"
 
diff --git a/arch/mips/mach-mtmips/spl.c b/arch/mips/mach-mtmips/spl.c
index 95201b8d7ab..2cb2ecf0e59 100644
--- a/arch/mips/mach-mtmips/spl.c
+++ b/arch/mips/mach-mtmips/spl.c
@@ -11,6 +11,7 @@
 #include <asm/sections.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <mach/serial.h>
 
 void __noreturn board_init_f(ulong dummy)
diff --git a/arch/mips/mach-octeon/cache.c b/arch/mips/mach-octeon/cache.c
index 9a88bb97c73..8ccaa2a7f3f 100644
--- a/arch/mips/mach-octeon/cache.c
+++ b/arch/mips/mach-octeon/cache.c
@@ -4,6 +4,7 @@
  */
 
 #include <cpu_func.h>
+#include <linux/types.h>
 
 /*
  * The Octeon platform is cache coherent and cache flushes and invalidates
diff --git a/arch/mips/mach-octeon/clock.c b/arch/mips/mach-octeon/clock.c
index 05a312b2298..eb341b1ac38 100644
--- a/arch/mips/mach-octeon/clock.c
+++ b/arch/mips/mach-octeon/clock.c
@@ -6,6 +6,7 @@
 #include <compiler.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 #include <mach/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/mach-octeon/cpu.c b/arch/mips/mach-octeon/cpu.c
index 1831f1dfa8c..5ac8b5047e2 100644
--- a/arch/mips/mach-octeon/cpu.c
+++ b/arch/mips/mach-octeon/cpu.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2020 Marvell International Ltd.
  */
 
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/bitfield.h>
diff --git a/arch/mips/mach-octeon/dram.c b/arch/mips/mach-octeon/dram.c
index 331394b34a6..da3dc4746e5 100644
--- a/arch/mips/mach-octeon/dram.c
+++ b/arch/mips/mach-octeon/dram.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/mach-octeon/include/ioremap.h b/arch/mips/mach-octeon/include/ioremap.h
index 59b75008a25..43b24122084 100644
--- a/arch/mips/mach-octeon/include/ioremap.h
+++ b/arch/mips/mach-octeon/include/ioremap.h
@@ -2,6 +2,7 @@
 #ifndef __ASM_MACH_OCTEON_IOREMAP_H
 #define __ASM_MACH_OCTEON_IOREMAP_H
 
+#include <compiler.h>
 #include <linux/types.h>
 
 /*
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index bc76152ed3d..739ecec666c 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -6,11 +6,13 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <init.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 #include <mach/pic32.h>
 #include <mach/ddr.h>
 #include <dt-bindings/clock/microchip,clock.h>
diff --git a/arch/mips/mach-pic32/include/mach/ddr.h b/arch/mips/mach-pic32/include/mach/ddr.h
index 1b2391e0160..fe15bb1504e 100644
--- a/arch/mips/mach-pic32/include/mach/ddr.h
+++ b/arch/mips/mach-pic32/include/mach/ddr.h
@@ -8,6 +8,7 @@
 #define __MICROCHIP_PIC32_DDR_H
 
 /* called by dram_init() function */
+#include <asm/types.h>
 void ddr2_phy_init(void);
 void ddr2_ctrl_init(void);
 phys_size_t ddr2_calculate_size(void);
diff --git a/arch/mips/mach-pic32/include/mach/pic32.h b/arch/mips/mach-pic32/include/mach/pic32.h
index 69015334b94..1fdfec5aa54 100644
--- a/arch/mips/mach-pic32/include/mach/pic32.h
+++ b/arch/mips/mach-pic32/include/mach/pic32.h
@@ -7,7 +7,9 @@
 #ifndef __PIC32_REGS_H__
 #define __PIC32_REGS_H__
 
+#include <compiler.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 /* System Configuration */
 #define PIC32_CFG_BASE		0x1f800000
diff --git a/arch/mips/mach-pic32/reset.c b/arch/mips/mach-pic32/reset.c
index 8071b13f7b4..8c33ff7faf9 100644
--- a/arch/mips/mach-pic32/reset.c
+++ b/arch/mips/mach-pic32/reset.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <mach/pic32.h>
 
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index 7fef69cd213..c516e270ca2 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -68,6 +68,7 @@ int timer_init(void)
 /*
  * reset time
  */
+#include <linux/types.h>
 void reset_timer_masked(void)
 {
 	struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
diff --git a/arch/nds32/include/asm/bootm.h b/arch/nds32/include/asm/bootm.h
index 804f8581b6e..aa8009fc8b7 100644
--- a/arch/nds32/include/asm/bootm.h
+++ b/arch/nds32/include/asm/bootm.h
@@ -9,6 +9,7 @@
 #define NDS32_BOOTM_H
 
 #include <asm/setup.h>
+#include <asm/types.h>
 
 extern void udc_disconnect(void);
 
diff --git a/arch/nds32/include/asm/io.h b/arch/nds32/include/asm/io.h
index fdfc574afc0..6555d3605b7 100644
--- a/arch/nds32/include/asm/io.h
+++ b/arch/nds32/include/asm/io.h
@@ -71,6 +71,7 @@ static inline phys_addr_t map_to_sysmem(const void *ptr)
 #define __arch_putw(v, a)		(*(unsigned short *)(a) = (v))
 #define __arch_putl(v, a)		(*(unsigned int *)(a) = (v))
 
+#include <compiler.h>
 extern void __raw_writesb(unsigned int addr, const void *data, int bytelen);
 extern void __raw_writesw(unsigned int addr, const void *data, int wordlen);
 extern void __raw_writesl(unsigned int addr, const void *data, int longlen);
diff --git a/arch/nds32/include/asm/setup.h b/arch/nds32/include/asm/setup.h
index 8217bbf6fe0..fcaa43a8247 100644
--- a/arch/nds32/include/asm/setup.h
+++ b/arch/nds32/include/asm/setup.h
@@ -13,6 +13,7 @@
 #ifndef __ASMNDS32_SETUP_H
 #define __ASMNDS32_SETUP_H
 
+#include <asm/types.h>
 #define COMMAND_LINE_SIZE 256
 
 /* The list ends with an ATAG_NONE node. */
diff --git a/arch/nds32/lib/boot.c b/arch/nds32/lib/boot.c
index 9411285fe23..9e3d2191b4b 100644
--- a/arch/nds32/lib/boot.c
+++ b/arch/nds32/lib/boot.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
 			 int argc, char *const argv[])
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 5532d515b73..47e8f90c417 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/bootm.h>
diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index 90cabb67571..fe40eaaa02e 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -14,6 +14,7 @@
 #include <asm/types.h>
 #include <asm/io.h>
 #include <asm/ptrace.h>
+#include <linux/types.h>
 
 /*************************************************************************/
 struct	irq_action {
diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h
index 65f67bc1f44..1dd7aa96e40 100644
--- a/arch/nios2/include/asm/dma-mapping.h
+++ b/arch/nios2/include/asm/dma-mapping.h
@@ -3,6 +3,7 @@
 
 #include <memalign.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /*
  * dma_alloc_coherent() return cache-line aligned allocation which is mapped
diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h
index 1a0e7d25fa3..4c9b6db070a 100644
--- a/arch/nios2/include/asm/global_data.h
+++ b/arch/nios2/include/asm/global_data.h
@@ -7,6 +7,7 @@
 #define __ASM_NIOS2_GLOBALDATA_H_
 
 /* Architecture-specific global data */
+#include <asm/types.h>
 struct arch_global_data {
 	u32 dcache_line_size;
 	u32 icache_line_size;
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index b22134cf29c..1e989c1e657 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -8,6 +8,7 @@
 #define __ASM_NIOS2_IO_H_
 
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 static inline void sync(void)
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 59099a4d5ea..d1be89a9917 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
diff --git a/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h b/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h
index 10a47e49876..b0740019e46 100644
--- a/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h
+++ b/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h
@@ -1,3 +1,4 @@
+#include <linux/types.h>
 	const __be32 acr_mask =
 #ifndef CONFIG_ACR_PIPE_DEP_UNSET
 		ACR_PIPE_DEP |
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index cdbf1e22636..a0b3d226b42 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -32,6 +32,7 @@
 #include <linux/immap_qe.h>
 #include <asm/io.h>
 #endif
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 8d242792987..0f1302e9eb6 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -16,6 +16,7 @@
 #endif
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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 2d9c8f24882..49f718298c2 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -7,11 +7,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <irq_func.h>
 #include <mpc83xx.h>
 #include <command.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/arch/powerpc/cpu/mpc83xx/fdt.c b/arch/powerpc/cpu/mpc83xx/fdt.c
index f658f98d5d6..8d47b3df766 100644
--- a/arch/powerpc/cpu/mpc83xx/fdt.c
+++ b/arch/powerpc/cpu/mpc83xx/fdt.c
@@ -13,6 +13,7 @@
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
+#include <linux/types.h>
 
 extern void ft_qe_setup(void *blob);
 
diff --git a/arch/powerpc/cpu/mpc83xx/initreg/initreg.h b/arch/powerpc/cpu/mpc83xx/initreg/initreg.h
index 63aa5c94669..1d4984bfc30 100644
--- a/arch/powerpc/cpu/mpc83xx/initreg/initreg.h
+++ b/arch/powerpc/cpu/mpc83xx/initreg/initreg.h
@@ -1,3 +1,4 @@
+#include <linux/types.h>
 #define SPCR_PCIHPE_MASK	0x10000000
 #define SPCR_PCIPR_MASK		0x03000000
 #define SPCR_OPT_MASK		0x00800000
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 2f463f87f7c..678d1db05cf 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -14,6 +14,7 @@
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index 17882bce7d2..4a7fb160b5d 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c
index 31883daa469..dc4fd57266c 100644
--- a/arch/powerpc/cpu/mpc83xx/pcie.c
+++ b/arch/powerpc/cpu/mpc83xx/pcie.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/arch/powerpc/cpu/mpc83xx/qe_io.c b/arch/powerpc/cpu/mpc83xx/qe_io.c
index 88aa6895511..d111def6f1d 100644
--- a/arch/powerpc/cpu/mpc83xx/qe_io.c
+++ b/arch/powerpc/cpu/mpc83xx/qe_io.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/immap_83xx.h>
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index b258f7f98a5..7e10d7cb464 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -170,6 +170,7 @@ long int spd_sdram()
 
 	/* Read SPD parameters with I2C */
 	CONFIG_SYS_READ_SPD(SPD_EEPROM_ADDRESS, SPD_EEPROM_OFFSET,
+#include <linux/types.h>
 		SPD_EEPROM_ADDR_LEN, (uchar *) &spd, sizeof(spd));
 #ifdef SPD_DEBUG
 	spd_debug(&spd);
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index 2f1355dfec9..6b620677075 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -505,6 +505,7 @@ int get_clocks(void)
  * get_bus_freq
  * return system bus freq in Hz
  *********************************************/
+#include <linux/types.h>
 ulong get_bus_freq(ulong dummy)
 {
 	return gd->arch.csb_clk;
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index f0d8330d3ac..b01448e45ff 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -11,6 +11,7 @@
 #include <time.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include "lblaw/lblaw.h"
 #include "elbc/elbc.h"
diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index b51bc729ca7..ed53fcb412d 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -21,6 +21,7 @@
 #include <asm/processor.h>
 #include <asm/mpc8349_pci.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/b4860_serdes.c b/arch/powerpc/cpu/mpc85xx/b4860_serdes.c
index ec18f298747..fef017c5158 100644
--- a/arch/powerpc/cpu/mpc85xx/b4860_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/b4860_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include "fsl_corenet2_serdes.h"
 
diff --git a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
index f5c9d1d8175..9a446535ed8 100644
--- a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define SRDS1_MAX_LANES		4
diff --git a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
index 8c61fd471bc..8bff23cbbf8 100644
--- a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define SRDS1_MAX_LANES		4
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 59fdc8860d9..6bfdddd1bd4 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 <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
@@ -13,6 +14,7 @@
 #include <asm/processor.h>
 #include <fsl_usb.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "fsl_corenet_serdes.h"
 
 #ifdef CONFIG_SYS_FSL_ERRATUM_A004849
diff --git a/arch/powerpc/cpu/mpc85xx/commproc.c b/arch/powerpc/cpu/mpc85xx/commproc.c
index 79ad806dbdf..9c6b8b75993 100644
--- a/arch/powerpc/cpu/mpc85xx/commproc.c
+++ b/arch/powerpc/cpu/mpc85xx/commproc.c
@@ -27,6 +27,7 @@
 #include <asm/cpm_85xx.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index da578d6c900..f61ad7c740b 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -8,6 +8,7 @@
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
@@ -35,6 +36,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 96d00883574..faa36693c04 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <env.h>
 #include <init.h>
@@ -40,6 +41,7 @@
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 4195ecc5c98..867fe124292 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -10,6 +10,7 @@
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
index df1981cc7ae..f2b108038ce 100644
--- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
@@ -15,6 +15,7 @@
  * Basic ET HW initialization and packet RX/TX routines
  *
  * This code will not perform the IO port configuration. This should be
+#include <linux/types.h>
  * done in the iop_conf_t structure specific for the board.
  *
  * TODO:
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 4864a6809a4..184ff257d49 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <stdio.h>
@@ -31,6 +32,7 @@
 #include <fsl_fman.h>
 #endif
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index accc10983b2..5ccd8dd1c29 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/fsl_serdes.h>
@@ -11,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/fsl_law.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h
index 4e2d4442746..76118b45cc1 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.h
@@ -6,6 +6,7 @@
 #ifndef __FSL_CORENET2_SERDES_H
 #define __FSL_CORENET2_SERDES_H
 
+#include <asm/types.h>
 int is_serdes_prtcl_valid(int serdes, u32 prtcl);
 int serdes_lane_enabled(int lane);
 #endif /* __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 a24e5feb932..91c95b39f9d 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "fsl_corenet_serdes.h"
 
 /*
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
index e95dc485814..705632eaa39 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
@@ -8,6 +8,7 @@
 #ifndef __FSL_CORENET_SERDES_H
 #define __FSL_CORENET_SERDES_H
 
+#include <linux/types.h>
 enum srds_bank {
 	FSL_SRDS_BANK_1  = 0,
 	FSL_SRDS_BANK_2  = 1,
diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index cfb2c7bf0ad..adcea19777c 100644
--- a/arch/powerpc/cpu/mpc85xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <irq_func.h>
 #include <log.h>
 #include <time.h>
@@ -23,6 +24,7 @@
 #endif
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 void interrupt_init_cpu(unsigned *decrementer_count)
 {
diff --git a/arch/powerpc/cpu/mpc85xx/liodn.c b/arch/powerpc/cpu/mpc85xx/liodn.c
index 5be3e08f040..b38a771a70e 100644
--- a/arch/powerpc/cpu/mpc85xx/liodn.c
+++ b/arch/powerpc/cpu/mpc85xx/liodn.c
@@ -11,6 +11,7 @@
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/immap_85xx.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 31ce76c01dd..56fc046a264 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -21,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "mp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/mp.h b/arch/powerpc/cpu/mpc85xx/mp.h
index ad9950bcf59..d8cd535b066 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.h
+++ b/arch/powerpc/cpu/mpc85xx/mp.h
@@ -2,6 +2,7 @@
 #define __MPC85XX_MP_H_
 
 #include <asm/mp.h>
+#include <asm/types.h>
 
 phys_addr_t get_spin_phys_addr(void);
 u32 get_my_id(void);
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
index d87150df761..557238c0183 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
index 0a472d0fd15..6913d669897 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
index ae291188f91..9f426b2f103 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
index 06c47826325..089785f71e4 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
index b5c9d829b7b..7b1880b6aa0 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
index f9976cce09d..7f946540208 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
index 7eac3017052..c10fc0804f7 100644
--- a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
index 01e0830d655..81429d6ed2c 100644
--- a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1022_serdes.c b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
index 7632fdbaf09..3fd6ed04b7b 100644
--- a/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
index fbb2573d2c7..8143bd1217a 100644
--- a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
index f1a60827f8a..d02473f23de 100644
--- a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/p2041_serdes.c b/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
index 1825720d6f2..6a93417dc5b 100644
--- a/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p2041_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/p3041_serdes.c b/arch/powerpc/cpu/mpc85xx/p3041_serdes.c
index 9dbf8463d88..e0b767888bb 100644
--- a/arch/powerpc/cpu/mpc85xx/p3041_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p3041_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/p4080_serdes.c b/arch/powerpc/cpu/mpc85xx/p4080_serdes.c
index feb7d6ddb7a..749145a5ac3 100644
--- a/arch/powerpc/cpu/mpc85xx/p4080_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p4080_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "fsl_corenet_serdes.h"
 
 static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
diff --git a/arch/powerpc/cpu/mpc85xx/p5020_serdes.c b/arch/powerpc/cpu/mpc85xx/p5020_serdes.c
index 9dbf8463d88..e0b767888bb 100644
--- a/arch/powerpc/cpu/mpc85xx/p5020_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p5020_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/p5040_serdes.c b/arch/powerpc/cpu/mpc85xx/p5040_serdes.c
index 5bb7ec0a09a..8e6fc7e7dd5 100644
--- a/arch/powerpc/cpu/mpc85xx/p5040_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p5040_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/pci.c b/arch/powerpc/cpu/mpc85xx/pci.c
index 5cfdb0e0d2e..a1707d01de0 100644
--- a/arch/powerpc/cpu/mpc85xx/pci.c
+++ b/arch/powerpc/cpu/mpc85xx/pci.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/cpm_85xx.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <pci.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/portals.c b/arch/powerpc/cpu/mpc85xx/portals.c
index add179be385..34994e31c62 100644
--- a/arch/powerpc/cpu/mpc85xx/portals.c
+++ b/arch/powerpc/cpu/mpc85xx/portals.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <linux/string.h>
diff --git a/arch/powerpc/cpu/mpc85xx/qe_io.c b/arch/powerpc/cpu/mpc85xx/qe_io.c
index fb75fa105ba..f3b365d8607 100644
--- a/arch/powerpc/cpu/mpc85xx/qe_io.c
+++ b/arch/powerpc/cpu/mpc85xx/qe_io.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
diff --git a/arch/powerpc/cpu/mpc85xx/serial_scc.c b/arch/powerpc/cpu/mpc85xx/serial_scc.c
index a2505d1ffc1..858f93d5dd8 100644
--- a/arch/powerpc/cpu/mpc85xx/serial_scc.c
+++ b/arch/powerpc/cpu/mpc85xx/serial_scc.c
@@ -16,10 +16,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/cpm_85xx.h>
 #include <serial.h>
 #include <asm/global_data.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 2e354897863..47e32ae6461 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -18,6 +18,7 @@
 #include <linux/compiler.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/spl_minimal.c b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
index 723f6ecef62..b6bd0438452 100644
--- a/arch/powerpc/cpu/mpc85xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/t1024_serdes.c b/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
index b1e1761688d..86daf910b25 100644
--- a/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t1024_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/t1040_serdes.c b/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
index dc3b660109e..4ceb2752f3a 100644
--- a/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t1040_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/t2080_serdes.c b/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
index 60c59984508..5bf64b1adcc 100644
--- a/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t2080_serdes.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet2_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
index e6b59e13313..d3b3822eb69 100644
--- a/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/t4240_serdes.c
@@ -7,6 +7,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "fsl_corenet2_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 56cbec484fc..9e529f62dec 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <stdio.h>
 #include <asm/bitops.h>
@@ -18,6 +19,7 @@
 #include <addr_map.h>
 #endif
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <linux/log2.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index ba564dedcfd..3d9892577ed 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -30,6 +30,7 @@
 #include <kgdb.h>
 #include <asm/processor.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index 8db7fe91e25..a6031c6dc2f 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -22,6 +22,7 @@
 #include <asm/ppc.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc86xx/fdt.c b/arch/powerpc/cpu/mpc86xx/fdt.c
index be6292dd6a3..5b1fbb4ea44 100644
--- a/arch/powerpc/cpu/mpc86xx/fdt.c
+++ b/arch/powerpc/cpu/mpc86xx/fdt.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index 7ae5b7d0b3a..9ca5ee8e756 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -27,6 +27,7 @@
 #endif
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 void interrupt_init_cpu(unsigned *decrementer_count)
 {
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index d6256e8b375..7bfaeb39d33 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/mp.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
index e91ebe4b1db..ec34a717d8b 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define SRDS1_MAX_LANES		4
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
index 232f85c2ad9..4983d8cd837 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define SRDS1_MAX_LANES		4
diff --git a/arch/powerpc/cpu/mpc86xx/speed.c b/arch/powerpc/cpu/mpc86xx/speed.c
index 770a9449197..64f229df72e 100644
--- a/arch/powerpc/cpu/mpc86xx/speed.c
+++ b/arch/powerpc/cpu/mpc86xx/speed.c
@@ -15,6 +15,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index d9728d0df33..ddf181c39ea 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -23,6 +23,7 @@
 #include <kgdb.h>
 #include <asm/processor.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 926a163eeea..dbd7e867dc2 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -17,6 +17,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <display_options.h>
 #include <net.h>
@@ -33,6 +34,7 @@
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
index fdba3d2c42c..7c9423b88f6 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <watchdog.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <mpc8xx.h>
 #include <asm/cpm_8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 1c65409ee30..692bcaee628 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -10,10 +10,12 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <asm/immap_8xx.h>
 #include <asm/cpm_8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c
index e0f3936f1bc..781fd85171a 100644
--- a/arch/powerpc/cpu/mpc8xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc8xx/interrupts.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <irq_func.h>
 #include <mpc8xx.h>
 #include <mpc8xx_irq.h>
@@ -15,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /************************************************************************/
 
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index ad3d3f9101c..26d12563bd0 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -6,10 +6,12 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <mpc8xx.h>
 #include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index 55c69225e37..f8531ee7d36 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -22,6 +22,7 @@
 #include <command.h>
 #include <asm/processor.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Returns 0 if exception not found and fixup otherwise.  */
 extern unsigned long search_exception_table(unsigned long);
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index e9ff1d2aaf9..8a4a42be4f4 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -7,6 +7,7 @@
  * cpu specific common code for 85xx/86xx processors.
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <command.h>
@@ -22,6 +23,7 @@
 #include <vsc9953.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 0bd2dbe8f97..15f7b712e40 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index 75c2d7629ce..d77f649cabb 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <asm/fsl_lbc.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_MPC83xx
 #include "../mpc83xx/elbc/elbc.h"
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index bc1b38da541..697031cd2ef 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -14,6 +14,7 @@
 #include <asm/fsl_pamu.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct paace *ppaact;
 struct paace *sec;
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index ddb53e6db65..427210a6c68 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index bf559d0f833..21b92a390b0 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -8,6 +8,7 @@
 #include <asm/fsl_pamu.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index 3548acdb256..8d4761f38a2 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -11,6 +11,7 @@
 #include <asm/fsl_law.h>
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_srio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/powerpc/include/asm/arch-mpc83xx/gpio.h b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h
index 8a6896e6229..7450468304f 100644
--- a/arch/powerpc/include/asm/arch-mpc83xx/gpio.h
+++ b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h
@@ -16,6 +16,7 @@
 #define MPC83XX_GPIO_CTRLRS 0
 #endif
 
+#include <linux/types.h>
 #define MAX_NUM_GPIOS (32 * MPC83XX_GPIO_CTRLRS)
 
 struct mpc8xxx_gpio_plat {
diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
index c7086a8361e..12da481f745 100644
--- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
+++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
@@ -17,6 +17,7 @@
 #include <asm/mpc85xx_gpio.h>
 #endif
 
+#include <linux/types.h>
 struct mpc8xxx_gpio_plat {
 	ulong addr;
 	unsigned long size;
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
index 445a366807d..b7c223b35c6 100644
--- a/arch/powerpc/include/asm/cache.h
+++ b/arch/powerpc/include/asm/cache.h
@@ -55,6 +55,7 @@ extern void invalidate_icache(void);
 #ifdef CONFIG_SYS_INIT_RAM_LOCK
 extern void unlock_ram_in_cache(void);
 #endif /* CONFIG_SYS_INIT_RAM_LOCK */
+#include <linux/types.h>
 #endif /* __ASSEMBLY__ */
 
 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
diff --git a/arch/powerpc/include/asm/cpm_85xx.h b/arch/powerpc/include/asm/cpm_85xx.h
index b46e20e5ce8..d9dd28d2fce 100644
--- a/arch/powerpc/include/asm/cpm_85xx.h
+++ b/arch/powerpc/include/asm/cpm_85xx.h
@@ -6,6 +6,7 @@
  * MPC8260 Communication Processor Module.
  * Copyright (c) 1999 Dan Malek (dmalek at jlc.net)
  *
+#include <linux/types.h>
  * This file contains structures and information for the communication
  * processor channels found in the dual port RAM or parameter RAM.
  * All CPM control and status is available through the MPC8260 internal
diff --git a/arch/powerpc/include/asm/cpm_8xx.h b/arch/powerpc/include/asm/cpm_8xx.h
index 85903d21088..5d804b23133 100644
--- a/arch/powerpc/include/asm/cpm_8xx.h
+++ b/arch/powerpc/include/asm/cpm_8xx.h
@@ -5,6 +5,7 @@
  * (C) Copyright 2000-2006
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
+#include <linux/types.h>
  * This file contains structures and information for the communication
  * processor channels.  Some CPM control and status is available
  * through the MPC8xx internal memory map.  See immap.h for details.
diff --git a/arch/powerpc/include/asm/fsl_dma.h b/arch/powerpc/include/asm/fsl_dma.h
index 727f4a7e92c..9e0cdf8028b 100644
--- a/arch/powerpc/include/asm/fsl_dma.h
+++ b/arch/powerpc/include/asm/fsl_dma.h
@@ -9,6 +9,7 @@
 #define _ASM_FSL_DMA_H_
 
 #include <asm/types.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_MPC83xx
 typedef struct fsl_dma {
diff --git a/arch/powerpc/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h
index 73105fa8e48..55226a3c059 100644
--- a/arch/powerpc/include/asm/fsl_i2c.h
+++ b/arch/powerpc/include/asm/fsl_i2c.h
@@ -13,8 +13,10 @@
 #ifndef _ASM_FSL_I2C_H_
 #define _ASM_FSL_I2C_H_
 
+#include <compiler.h>
 #include <asm/types.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 typedef struct fsl_i2c_base {
 
diff --git a/arch/powerpc/include/asm/fsl_law.h b/arch/powerpc/include/asm/fsl_law.h
index 888640df6f8..7dde8dcf412 100644
--- a/arch/powerpc/include/asm/fsl_law.h
+++ b/arch/powerpc/include/asm/fsl_law.h
@@ -7,6 +7,7 @@
 #define _FSL_LAW_H_
 
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/log2.h>
 
 #define LAW_EN	0x80000000
diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h
index bf352d9a561..c3a0ee5424c 100644
--- a/arch/powerpc/include/asm/fsl_lbc.h
+++ b/arch/powerpc/include/asm/fsl_lbc.h
@@ -465,6 +465,7 @@ void lbc_sdram_init(void);
 
 #ifndef __ASSEMBLY__
 #include <asm/io.h>
+#include <linux/types.h>
 
 extern void print_lbc_regs(void);
 extern void init_early_memctl_regs(void);
diff --git a/arch/powerpc/include/asm/fsl_mpc83xx_serdes.h b/arch/powerpc/include/asm/fsl_mpc83xx_serdes.h
index a02b5992654..67f47076768 100644
--- a/arch/powerpc/include/asm/fsl_mpc83xx_serdes.h
+++ b/arch/powerpc/include/asm/fsl_mpc83xx_serdes.h
@@ -23,4 +23,5 @@ extern void fsl_setup_serdes(u32 offset, char proto, u32 rfcks, char vdd);
 
 #endif /* !CONFIG_MPC83XX_SERDES */
 
+#include <asm/types.h>
 #endif /* __FSL_MPC83XX_SERDES_H */
diff --git a/arch/powerpc/include/asm/fsl_pamu.h b/arch/powerpc/include/asm/fsl_pamu.h
index 07e822b796e..cd711fb8613 100644
--- a/arch/powerpc/include/asm/fsl_pamu.h
+++ b/arch/powerpc/include/asm/fsl_pamu.h
@@ -6,6 +6,7 @@
 #ifndef __PAMU_H
 #define __PAMU_H
 
+#include <linux/types.h>
 #define CONFIG_NUM_PAMU		16
 #define NUM_PPAACT_ENTRIES	512
 #define NUM_SPAACT_ENTRIES	256
diff --git a/arch/powerpc/include/asm/fsl_pci.h b/arch/powerpc/include/asm/fsl_pci.h
index 508834829b9..5ebad5c7e5e 100644
--- a/arch/powerpc/include/asm/fsl_pci.h
+++ b/arch/powerpc/include/asm/fsl_pci.h
@@ -9,6 +9,7 @@
 #include <asm/fsl_law.h>
 #include <asm/fsl_serdes.h>
 #include <pci.h>
+#include <asm/types.h>
 
 #define PEX_IP_BLK_REV_2_2	0x02080202
 #define PEX_IP_BLK_REV_2_3	0x02080203
diff --git a/arch/powerpc/include/asm/fsl_portals.h b/arch/powerpc/include/asm/fsl_portals.h
index b1fd6bd5cef..f277b20260e 100644
--- a/arch/powerpc/include/asm/fsl_portals.h
+++ b/arch/powerpc/include/asm/fsl_portals.h
@@ -7,6 +7,7 @@
 #define _FSL_PORTALS_H_
 
 /* entries must be in order and contiguous */
+#include <asm/types.h>
 enum fsl_dpaa_dev {
 	FSL_HW_PORTAL_SEC,
 #ifdef CONFIG_SYS_DPAA_FMAN
diff --git a/arch/powerpc/include/asm/fsl_serdes.h b/arch/powerpc/include/asm/fsl_serdes.h
index ddde4f80c63..8588006b7af 100644
--- a/arch/powerpc/include/asm/fsl_serdes.h
+++ b/arch/powerpc/include/asm/fsl_serdes.h
@@ -7,6 +7,7 @@
 #define __FSL_SERDES_H
 
 #include <config.h>
+#include <asm/types.h>
 
 enum srds_prtcl {
 	/*
diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index 192a02d347e..04e0c38b848 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -9,7 +9,7 @@
 #define __ASM_GBL_DATA_H
 
 #include "config.h"
-#include "asm/types.h"
+#include "linux/types.h"
 
 /* Architecture-specific global data */
 struct arch_global_data {
diff --git a/arch/powerpc/include/asm/immap_86xx.h b/arch/powerpc/include/asm/immap_86xx.h
index 1fbc63a5ceb..0e3433555c8 100644
--- a/arch/powerpc/include/asm/immap_86xx.h
+++ b/arch/powerpc/include/asm/immap_86xx.h
@@ -15,6 +15,7 @@
 #include <asm/fsl_dma.h>
 #include <asm/fsl_lbc.h>
 #include <asm/fsl_i2c.h>
+#include <linux/types.h>
 
 /* Local-Access Registers and MCM Registers(0x0000-0x2000) */
 typedef struct ccsr_local_mcm {
diff --git a/arch/powerpc/include/asm/immap_8xx.h b/arch/powerpc/include/asm/immap_8xx.h
index 3999a02b9c7..6f9f9a250c7 100644
--- a/arch/powerpc/include/asm/immap_8xx.h
+++ b/arch/powerpc/include/asm/immap_8xx.h
@@ -14,6 +14,7 @@
 
 /* System configuration registers.
 */
+#include <linux/types.h>
 typedef	struct sys_conf {
 	uint	sc_siumcr;
 	uint	sc_sypcr;
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index ccc5e664cf4..e8d86574a5d 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -7,7 +7,9 @@
 #ifndef _PPC_IO_H
 #define _PPC_IO_H
 
+#include <compiler.h>
 #include <asm/byteorder.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #ifdef CONFIG_ADDR_MAP
diff --git a/arch/powerpc/include/asm/iopin_8xx.h b/arch/powerpc/include/asm/iopin_8xx.h
index a41b3323325..82d5a180272 100644
--- a/arch/powerpc/include/asm/iopin_8xx.h
+++ b/arch/powerpc/include/asm/iopin_8xx.h
@@ -8,6 +8,7 @@
 #ifndef _ASM_IOPIN_8XX_H_
 #define _ASM_IOPIN_8XX_H_
 
+#include <compiler.h>
 #include <linux/types.h>
 #include <asm/immap_8xx.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 353dc4e8748..901ed9329df 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -8,6 +8,7 @@
 #ifndef __ASSEMBLY__
 /* Hardware Page Table Entry */
 #include <linux/bitops.h>
+#include <linux/types.h>
 typedef struct _PTE {
 #ifdef CONFIG_PPC64BRIDGE
 	unsigned long long vsid:52;
diff --git a/arch/powerpc/include/asm/mp.h b/arch/powerpc/include/asm/mp.h
index 8dacd2781d4..619053cd01f 100644
--- a/arch/powerpc/include/asm/mp.h
+++ b/arch/powerpc/include/asm/mp.h
@@ -7,6 +7,7 @@
 #define _ASM_MP_H_
 
 #include <lmb.h>
+#include <asm/types.h>
 
 void setup_mp(void);
 void cpu_mp_lmb_reserve(struct lmb *lmb);
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 661e7b5989a..507ece4724d 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -39,6 +39,7 @@
 
 #include <asm/processor.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static inline uint get_immr(void)
 {
diff --git a/arch/powerpc/lib/bdinfo.c b/arch/powerpc/lib/bdinfo.c
index 8174d282b53..98af5d092ca 100644
--- a/arch/powerpc/lib/bdinfo.c
+++ b/arch/powerpc/lib/bdinfo.c
@@ -7,10 +7,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index f283c1a9a47..6ff9eae7535 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -22,6 +22,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <asm/byteorder.h>
diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c
index 3c3c470bbbd..86fff84f978 100644
--- a/arch/powerpc/lib/cache.c
+++ b/arch/powerpc/lib/cache.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <watchdog.h>
+#include <linux/types.h>
 
 void flush_cache(ulong start_addr, ulong size)
 {
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index c232a1412c8..23eb50ac744 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -17,6 +17,7 @@
 #include <status_led.h>
 #endif
 #include <asm/ptrace.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_MPC83XX_TIMER
 #ifndef CONFIG_SYS_WATCHDOG_FREQ
diff --git a/arch/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c
index d4a6057527c..d01b6843689 100644
--- a/arch/powerpc/lib/spl.c
+++ b/arch/powerpc/lib/spl.c
@@ -8,6 +8,7 @@
 #include <spl.h>
 #include <image.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 /*
  * This function jumps to an image with argument. Normally an FDT or ATAGS
diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
index f2a4652e081..438b70c82b1 100644
--- a/arch/powerpc/lib/stack.c
+++ b/arch/powerpc/lib/stack.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index d27432c23af..702766a788a 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -9,6 +9,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 /* ------------------------------------------------------------------------- */
 
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index 5d5b1d523ac..d7bf45a5f97 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <asm/encoding.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/uclass-internal.h>
 #include <linux/bitops.h>
diff --git a/arch/riscv/cpu/fu540/cache.c b/arch/riscv/cpu/fu540/cache.c
index 6d602158dd2..f0b8e55e20e 100644
--- a/arch/riscv/cpu/fu540/cache.c
+++ b/arch/riscv/cpu/fu540/cache.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /* Register offsets */
diff --git a/arch/riscv/cpu/fu540/dram.c b/arch/riscv/cpu/fu540/dram.c
index 26118ea4c82..4c63f86f279 100644
--- a/arch/riscv/cpu/fu540/dram.c
+++ b/arch/riscv/cpu/fu540/dram.c
@@ -9,6 +9,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c
index 26118ea4c82..4c63f86f279 100644
--- a/arch/riscv/cpu/generic/dram.c
+++ b/arch/riscv/cpu/generic/dram.c
@@ -9,6 +9,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
index 2eb14815bcf..73d76c362dd 100644
--- a/arch/riscv/include/asm/global_data.h
+++ b/arch/riscv/include/asm/global_data.h
@@ -13,6 +13,7 @@
 #include <asm/smp.h>
 #include <asm/u-boot.h>
 #include <compiler.h>
+#include <linux/types.h>
 
 /* Architecture-specific global data */
 struct arch_global_data {
diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h
index acf5a96449c..f823f1fb18b 100644
--- a/arch/riscv/include/asm/io.h
+++ b/arch/riscv/include/asm/io.h
@@ -68,6 +68,7 @@ static inline phys_addr_t map_to_sysmem(const void *ptr)
 #define __iormb()	rmb()
 #define __iowmb()	wmb()
 
+#include <compiler.h>
 static inline void writeb(u8 val, volatile void __iomem *addr)
 {
 	__iowmb();
diff --git a/arch/riscv/include/asm/ptrace.h b/arch/riscv/include/asm/ptrace.h
index 651078fcfda..19984e34de8 100644
--- a/arch/riscv/include/asm/ptrace.h
+++ b/arch/riscv/include/asm/ptrace.h
@@ -9,6 +9,7 @@
 #ifndef __ASM_RISCV_PTRACE_H
 #define __ASM_RISCV_PTRACE_H
 
+#include <linux/types.h>
 struct pt_regs {
 	unsigned long sepc;
 	unsigned long ra;
diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h
index 1b428856b26..0cbe7bf24ee 100644
--- a/arch/riscv/include/asm/smp.h
+++ b/arch/riscv/include/asm/smp.h
@@ -7,6 +7,7 @@
 #ifndef _ASM_RISCV_SMP_H
 #define _ASM_RISCV_SMP_H
 
+#include <linux/types.h>
 /**
  * struct ipi_data - Inter-processor interrupt (IPI) data structure
  *
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index f892548a6c5..14ba884483a 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <asm/global_data.h>
 #include <dm/device-internal.h>
@@ -21,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* pending register */
 #define PENDING_REG(base, hart)	((ulong)(base) + 0x1000 + ((hart) / 4) * 4)
diff --git a/arch/riscv/lib/andes_plmt.c b/arch/riscv/lib/andes_plmt.c
index c453d9042c8..a38d6cfe38c 100644
--- a/arch/riscv/lib/andes_plmt.c
+++ b/arch/riscv/lib/andes_plmt.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
@@ -15,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/syscon.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 /* mtime register */
 #define MTIME_REG(base)			((ulong)(base))
diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c
index 83c96799e91..24c97063c9d 100644
--- a/arch/riscv/lib/boot.c
+++ b/arch/riscv/lib/boot.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
 			 int argc, char *const argv[])
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 8bd6fd0c89d..b2c251cbcf5 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdt_support.h>
 #include <hang.h>
@@ -23,6 +24,7 @@
 #include <asm/smp.h>
 #include <dm/device.h>
 #include <dm/root.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
index 932243596cc..b5bed42991b 100644
--- a/arch/riscv/lib/fdt_fixup.c
+++ b/arch/riscv/lib/fdt_fixup.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 2f78b25807a..8cca200416f 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/sizes.h>
 #include <linux/stddef.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index 7b5a0743cce..cb0706410fd 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -17,6 +17,7 @@
 #include <asm/system.h>
 #include <asm/encoding.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static void show_regs(struct pt_regs *regs)
 {
diff --git a/arch/riscv/lib/rdtime.c b/arch/riscv/lib/rdtime.c
index e128d7fce69..f05977019d6 100644
--- a/arch/riscv/lib/rdtime.c
+++ b/arch/riscv/lib/rdtime.c
@@ -4,10 +4,12 @@
  * Copyright (C) 2018, Bin Meng <bmeng.cn at gmail.com>
  *
  * The riscv_get_time() API implementation that is using the
+#include <asm/types.h>
  * standard rdtime instruction.
  */
 
 #include <common.h>
+#include <linux/types.h>
 
 /* Implement the API required by RISC-V timer driver */
 int riscv_get_time(u64 *time)
diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index c1039dd165d..0520ddd6e38 100644
--- a/arch/riscv/lib/reloc_riscv_efi.c
+++ b/arch/riscv/lib/reloc_riscv_efi.c
@@ -37,6 +37,7 @@
 */
 
 #include <efi.h>
+#include <linux/types.h>
 
 #include <elf.h>
 
diff --git a/arch/riscv/lib/sbi.c b/arch/riscv/lib/sbi.c
index 984499960a1..a3b56a1dbd3 100644
--- a/arch/riscv/lib/sbi.c
+++ b/arch/riscv/lib/sbi.c
@@ -11,6 +11,7 @@
 #include <asm/encoding.h>
 #include <asm/sbi.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
 			unsigned long arg1, unsigned long arg2,
diff --git a/arch/riscv/lib/sbi_ipi.c b/arch/riscv/lib/sbi_ipi.c
index d02e2b4c488..fe5eeaad1d5 100644
--- a/arch/riscv/lib/sbi_ipi.c
+++ b/arch/riscv/lib/sbi_ipi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/encoding.h>
 #include <asm/sbi.h>
+#include <linux/types.h>
 
 int riscv_init_ipi(void)
 {
diff --git a/arch/riscv/lib/sifive_clint.c b/arch/riscv/lib/sifive_clint.c
index 97b7169a02c..a22229643bd 100644
--- a/arch/riscv/lib/sifive_clint.c
+++ b/arch/riscv/lib/sifive_clint.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
@@ -15,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/syscon.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 /* MSIP registers */
 #define MSIP_REG(base, hart)		((ulong)(base) + (hart) * 4)
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index 09dd439b59a..a229a84fc9d 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -12,6 +12,7 @@
 #include <asm/smp.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index fce60935fb6..6d3700245c3 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -4,6 +4,7 @@
  * Lukas Auer <lukas.auer at aisec.fraunhofer.de>
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
@@ -12,6 +13,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/smp.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 8b5323fc815..ca35019903e 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -22,6 +22,7 @@
 #include <asm/setjmp.h>
 #include <asm/state.h>
 #include <dm/root.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index c1c9bb68e0a..e37bf3addbd 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -12,6 +12,7 @@
 #include <SDL2/SDL.h>
 #include <asm/state.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct buf_info - a data buffer holding audio data
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 52cabd7ff12..e4fe62a1c43 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -16,6 +16,7 @@
 #include <asm/state.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 5533100bdec..c9dbcf763d7 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index 849dfbd1d66..d99a8d27c82 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -14,6 +14,7 @@
 #include <asm/state.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Main state record for the sandbox */
 static struct sandbox_state main_state;
diff --git a/arch/sandbox/include/asm/axi.h b/arch/sandbox/include/asm/axi.h
index d483f7b65a0..b533a46dc8f 100644
--- a/arch/sandbox/include/asm/axi.h
+++ b/arch/sandbox/include/asm/axi.h
@@ -7,6 +7,7 @@
 #ifndef __asm_axi_h
 #define __asm_axi_h
 
+#include <linux/types.h>
 #define axi_emul_get_ops(dev)	((struct axi_emul_ops *)(dev)->driver->ops)
 
 /**
diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h
index c184c4bffcf..9e6b96700a2 100644
--- a/arch/sandbox/include/asm/clk.h
+++ b/arch/sandbox/include/asm/clk.h
@@ -7,6 +7,7 @@
 #define __SANDBOX_CLK_H
 
 #include <common.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/arch/sandbox/include/asm/eth.h b/arch/sandbox/include/asm/eth.h
index 8c3c957b56f..62bbd9afea0 100644
--- a/arch/sandbox/include/asm/eth.h
+++ b/arch/sandbox/include/asm/eth.h
@@ -11,6 +11,7 @@
 
 #include <net.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 void sandbox_eth_disable_response(int index, bool disable);
 
diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h
index f95ddb058a2..00a53e570b3 100644
--- a/arch/sandbox/include/asm/global_data.h
+++ b/arch/sandbox/include/asm/global_data.h
@@ -10,6 +10,7 @@
 #define __ASM_GBL_DATA_H
 
 /* Architecture-specific global data */
+#include <linux/types.h>
 struct arch_global_data {
 	uint8_t		*ram_buf;	/* emulated RAM buffer */
 	void		*text_base;	/* pointer to base of text region */
diff --git a/arch/sandbox/include/asm/gpio.h b/arch/sandbox/include/asm/gpio.h
index df4ba4fb5f3..967fe9ad213 100644
--- a/arch/sandbox/include/asm/gpio.h
+++ b/arch/sandbox/include/asm/gpio.h
@@ -22,6 +22,7 @@
  * NOTE: DO NOT use the functions in this file except in test code!
  */
 #include <asm-generic/gpio.h>
+#include <linux/types.h>
 
 /**
  * Return the simulated value of a GPIO (used only in sandbox test code)
diff --git a/arch/sandbox/include/asm/handoff.h b/arch/sandbox/include/asm/handoff.h
index be4e7b0fae2..f8a72cd87a5 100644
--- a/arch/sandbox/include/asm/handoff.h
+++ b/arch/sandbox/include/asm/handoff.h
@@ -9,6 +9,7 @@
 #ifndef __handoff_h
 #define __handoff_h
 
+#include <linux/types.h>
 #define TEST_HANDOFF_MAGIC	0x14f93c7b
 
 struct arch_spl_handoff {
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index ad6c29a4e26..e671262b5d6 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -6,6 +6,7 @@
 #ifndef __SANDBOX_ASM_IO_H
 #define __SANDBOX_ASM_IO_H
 
+#include <linux/types.h>
 enum sandboxio_size_t {
 	SB_SIZE_8,
 	SB_SIZE_16,
diff --git a/arch/sandbox/include/asm/mbox.h b/arch/sandbox/include/asm/mbox.h
index 70f36d7afef..c3b8a9f14ad 100644
--- a/arch/sandbox/include/asm/mbox.h
+++ b/arch/sandbox/include/asm/mbox.h
@@ -7,6 +7,7 @@
 #define __SANDBOX_MBOX_H
 
 #include <common.h>
+#include <linux/types.h>
 
 #define SANDBOX_MBOX_PING_XOR 0x12345678
 
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index a14e0a8f8a2..75904d9fad2 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SANDBOX_SDL
 
diff --git a/arch/sandbox/include/asm/sections.h b/arch/sandbox/include/asm/sections.h
index fbc1bd11a34..32667b7cf16 100644
--- a/arch/sandbox/include/asm/sections.h
+++ b/arch/sandbox/include/asm/sections.h
@@ -10,6 +10,7 @@
 #define __SANDBOX_SECTIONS_H
 
 #include <asm-generic/sections.h>
+#include <linux/types.h>
 
 struct sandbox_cmdline_option;
 
diff --git a/arch/sandbox/include/asm/setjmp.h b/arch/sandbox/include/asm/setjmp.h
index 001c7ea322d..27168ca1850 100644
--- a/arch/sandbox/include/asm/setjmp.h
+++ b/arch/sandbox/include/asm/setjmp.h
@@ -7,6 +7,7 @@
 #ifndef _SETJMP_H_
 #define _SETJMP_H_
 
+#include <linux/types.h>
 struct jmp_buf_data {
 	/*
 	 * We're not sure how long this should be:
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index 1bfad305f1a..0a0322c3977 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <linux/list.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 /**
  * Selects the behavior of the serial terminal.
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index 6ac8c1a8288..1be290ea710 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -10,6 +10,7 @@
 
 /* The sandbox driver always permits an I2C device with this address */
 #include <stdbool.h>
+#include <linux/types.h>
 #define SANDBOX_I2C_TEST_ADDR		0x59
 
 #define SANDBOX_PCI_VENDOR_ID		0x1234
diff --git a/arch/sandbox/include/asm/u-boot-sandbox.h b/arch/sandbox/include/asm/u-boot-sandbox.h
index 798d0030773..9433e5258e5 100644
--- a/arch/sandbox/include/asm/u-boot-sandbox.h
+++ b/arch/sandbox/include/asm/u-boot-sandbox.h
@@ -15,6 +15,7 @@
 #define _U_BOOT_SANDBOX_H_
 
 /* board/.../... */
+#include <asm/types.h>
 int board_init(void);
 
 /* start.c */
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index d9378f019c0..116ec10ae26 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -6,10 +6,12 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <image.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
 
diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index b7ce34aa1ea..c01428928fd 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
 		    struct udevice **devp, void **ptrp)
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 0f7dfdd3cf7..037d24f4ab3 100644
--- a/arch/sh/cpu/sh4/cache.c
+++ b/arch/sh/cpu/sh4/cache.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/system.h>
+#include <asm/types.h>
 
 #define CACHE_VALID       1
 #define CACHE_UPDATED     2
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index 5d79d0ec58e..dfa6184e0b9 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -18,6 +18,7 @@ int pci_sh7780_init(struct pci_controller *hose);
 #else
 #error "Not support PCI."
 #endif
+#include <asm/types.h>
 
 int pci_sh4_init(struct pci_controller *hose);
 /* PCI dword read for sh4 */
diff --git a/arch/sh/include/asm/string.h b/arch/sh/include/asm/string.h
index 999febcb6b7..cc1f28af19d 100644
--- a/arch/sh/include/asm/string.h
+++ b/arch/sh/include/asm/string.h
@@ -130,4 +130,5 @@ extern int strcasecmp(const char *, const char *);
 #define __HAVE_ARCH_STRTOK      1
 
 #endif /* KERNEL */
+#include <linux/types.h>
 #endif /* __ASM_SH_STRING_H */
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
index f43213a50e9..105f204a70b 100644
--- a/arch/sh/lib/board.c
+++ b/arch/sh/lib/board.c
@@ -7,6 +7,7 @@
 #include <init.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index 5484c543c6c..5788c552abd 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <linux/delay.h>
+#include <linux/types.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 8567d390376..20eab6bbbff 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/zimage.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c
index 5610d543723..1b51b44e8c6 100644
--- a/arch/x86/cpu/acpi_gpe.c
+++ b/arch/x86/cpu/acpi_gpe.c
@@ -15,6 +15,7 @@
 #include <dt-bindings/interrupt-controller/x86-irq.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct acpi_gpe_priv - private driver information
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index 786d65311c8..db82b150f6d 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -36,6 +36,7 @@
 #include <asm/fsp2/fsp_api.h>
 #include <asm/u-boot.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <power/acpi_pmc.h>
 
 /* Define this here to avoid referencing any drivers for the debug UART 1 */
diff --git a/arch/x86/cpu/apollolake/fsp_bindings.c b/arch/x86/cpu/apollolake/fsp_bindings.c
index c710db39942..e75fd7f354f 100644
--- a/arch/x86/cpu/apollolake/fsp_bindings.c
+++ b/arch/x86/cpu/apollolake/fsp_bindings.c
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * read_u8_prop() - Read an u8 property from devicetree (scalar or array)
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 433dcf08c77..5876edaa007 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <p2sb.h>
+#include <stdbool.h>
 #include <acpi/acpi_s3.h>
 #include <asm/global_data.h>
 #include <asm/intel_pinctrl.h>
@@ -30,6 +31,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 99f1b441312..4477e580fbb 100644
--- a/arch/x86/cpu/apollolake/hostbridge.c
+++ b/arch/x86/cpu/apollolake/hostbridge.c
@@ -13,6 +13,7 @@
 #include <asm/pci.h>
 #include <asm/arch/systemagent.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /**
  * struct apl_hostbridge_platdata - platform data for hostbridge
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c
index 07a64502061..4c12d80b38b 100644
--- a/arch/x86/cpu/apollolake/lpc.c
+++ b/arch/x86/cpu/apollolake/lpc.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/log2.h>
+#include <linux/types.h>
 
 void lpc_enable_fixed_io_ranges(uint io_enables)
 {
diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c
index 8adc33bfd30..96b3845a297 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -13,12 +13,14 @@
 #include <dm.h>
 #include <log.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <acpi/acpi_s3.h>
 #include <asm/io.h>
 #include <asm/pci.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 632309f6901..ecc2fe1ca20 100644
--- a/arch/x86/cpu/apollolake/punit.c
+++ b/arch/x86/cpu/apollolake/punit.c
@@ -16,6 +16,7 @@
 #include <asm/arch/systemagent.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 618b20add16..a8cd253deec 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -22,6 +22,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* This reads the next phase from mapped SPI flash */
 static int rom_load_image(struct spl_image_info *spl_image,
diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c
index 2a201022945..8c031445b95 100644
--- a/arch/x86/cpu/apollolake/uart.c
+++ b/arch/x86/cpu/apollolake/uart.c
@@ -17,6 +17,7 @@
 #include <asm/pci.h>
 #include <asm/lpss.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Low-power Subsystem (LPSS) clock register */
 enum {
diff --git a/arch/x86/cpu/baytrail/acpi.c b/arch/x86/cpu/baytrail/acpi.c
index e6c721a16ba..fe7139e6509 100644
--- a/arch/x86/cpu/baytrail/acpi.c
+++ b/arch/x86/cpu/baytrail/acpi.c
@@ -13,6 +13,7 @@
 #include <asm/tables.h>
 #include <asm/arch/global_nvs.h>
 #include <asm/arch/iomap.h>
+#include <asm/types.h>
 #include <dm/uclass-internal.h>
 #include <linux/string.h>
 
diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c
index 309a50a1161..8cc19c02e2b 100644
--- a/arch/x86/cpu/baytrail/cpu.c
+++ b/arch/x86/cpu/baytrail/cpu.c
@@ -17,6 +17,7 @@
 #include <asm/lapic.h>
 #include <asm/msr.h>
 #include <asm/turbo.h>
+#include <linux/types.h>
 
 #define BYT_PRV_CLK			0x800
 #define BYT_PRV_CLK_EN			(1 << 0)
diff --git a/arch/x86/cpu/baytrail/early_uart.c b/arch/x86/cpu/baytrail/early_uart.c
index e8ed6ea447b..88fcbcfabff 100644
--- a/arch/x86/cpu/baytrail/early_uart.c
+++ b/arch/x86/cpu/baytrail/early_uart.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define PCI_DEV_CONFIG(segbus, dev, fn) ( \
 		(((segbus) & 0xfff) << 20) | \
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index fb3f946c45f..da89f6db4c1 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/fsp1/fsp_support.h>
diff --git a/arch/x86/cpu/braswell/early_uart.c b/arch/x86/cpu/braswell/early_uart.c
index f6f3e9d8a80..ebbe8c384aa 100644
--- a/arch/x86/cpu/braswell/early_uart.c
+++ b/arch/x86/cpu/braswell/early_uart.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define PCI_DEV_CONFIG(segbus, dev, fn) ( \
 		(((segbus) & 0xfff) << 20) | \
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 243298fd571..70a9fa004a7 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/fsp1/fsp_support.h>
diff --git a/arch/x86/cpu/broadwell/adsp.c b/arch/x86/cpu/broadwell/adsp.c
index beab06dee95..b7a615fc37e 100644
--- a/arch/x86/cpu/broadwell/adsp.c
+++ b/arch/x86/cpu/broadwell/adsp.c
@@ -20,6 +20,7 @@
 #include <asm/arch/adsp.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/rcb.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 enum pci_type_t {
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index f4b930225bd..0f2da4ff3aa 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -10,6 +10,7 @@
 #include <cpu.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
@@ -25,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 68c57f4f18a..68c41695eb5 100644
--- a/arch/x86/cpu/broadwell/iobp.c
+++ b/arch/x86/cpu/broadwell/iobp.c
@@ -12,6 +12,7 @@
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/arch/pch.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/arch/x86/cpu/broadwell/lpc.c b/arch/x86/cpu/broadwell/lpc.c
index d2638a4e7a6..280eeb6c745 100644
--- a/arch/x86/cpu/broadwell/lpc.c
+++ b/arch/x86/cpu/broadwell/lpc.c
@@ -15,6 +15,7 @@
 #include <asm/lpc_common.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/spi.h>
+#include <asm/types.h>
 
 static void set_spi_speed(void)
 {
diff --git a/arch/x86/cpu/broadwell/me.c b/arch/x86/cpu/broadwell/me.c
index 89b7bd15082..397cba6d343 100644
--- a/arch/x86/cpu/broadwell/me.c
+++ b/arch/x86/cpu/broadwell/me.c
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static inline void me_read_dword_ptr(struct udevice *dev, void *ptr, int offset)
 {
diff --git a/arch/x86/cpu/broadwell/northbridge.c b/arch/x86/cpu/broadwell/northbridge.c
index 4b0dd46f7fe..2d851ed4fe8 100644
--- a/arch/x86/cpu/broadwell/northbridge.c
+++ b/arch/x86/cpu/broadwell/northbridge.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -13,6 +14,7 @@
 #include <asm/arch/pch.h>
 #include <asm/arch/pei_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 __weak asmlinkage void sdram_console_tx_byte(unsigned char byte)
 {
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index f7f975983e6..b834c8471b9 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <pch.h>
+#include <stdbool.h>
 #include <asm/cpu.h>
 #include <asm/global_data.h>
 #include <asm/gpio.h>
@@ -28,6 +29,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define BIOS_CTRL	0xdc
 
diff --git a/arch/x86/cpu/broadwell/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index 0bb28739fdc..60453956e50 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <pch.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <asm/cpu.h>
 #include <asm/global_data.h>
 #include <asm/gpio.h>
@@ -22,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
index f6f6250dfbd..1cb588df7e7 100644
--- a/arch/x86/cpu/broadwell/refcode.c
+++ b/arch/x86/cpu/broadwell/refcode.c
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
  * Read a coreboot rmodule and execute it.
+#include <compiler.h>
+#include <linux/types.h>
  * The rmodule_header struct is from coreboot.
  *
  * Copyright (c) 2016 Google, Inc
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index 27d6bf706e2..2bdb1ffae22 100644
--- a/arch/x86/cpu/broadwell/sata.c
+++ b/arch/x86/cpu/broadwell/sata.c
@@ -17,6 +17,7 @@
 #include <asm/pch_common.h>
 #include <asm/arch/pch.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 struct sata_platdata {
 	int port_map;
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index d606d4e1932..fd3de2a91ca 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -28,6 +28,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 ulong board_get_usable_ram_top(ulong total_size)
 {
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 748b8dabe71..17e5c858a9f 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -17,6 +17,7 @@
 #include <asm/mtrr.h>
 #include <asm/arch/sysinfo.h>
 #include <asm/arch/timestamp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index e2dfbc1937b..df88cfbf829 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
index f0c350605e1..68d2805a7bc 100644
--- a/arch/x86/cpu/coreboot/tables.c
+++ b/arch/x86/cpu/coreboot/tables.c
@@ -7,10 +7,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <net.h>
 #include <asm/arch/sysinfo.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/coreboot/timestamp.c b/arch/x86/cpu/coreboot/timestamp.c
index 86e1f9693ee..3290403e91f 100644
--- a/arch/x86/cpu/coreboot/timestamp.c
+++ b/arch/x86/cpu/coreboot/timestamp.c
@@ -7,10 +7,12 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <asm/arch/timestamp.h>
 #include <asm/arch/sysinfo.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 struct timestamp_entry {
 	uint32_t	entry_id;
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index c1e9be4eda8..578f1118122 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -52,6 +53,7 @@
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 41f51a21ff6..6e84e11e0cf 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -20,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c
index 2b164f72de9..0a7cfe0c93e 100644
--- a/arch/x86/cpu/efi/sdram.c
+++ b/arch/x86/cpu/efi/sdram.c
@@ -9,6 +9,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot-x86.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index f1b56a3a215..f58b5d7ee2d 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -19,11 +19,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <log.h>
 #include <malloc.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/control_regs.h>
 #include <asm/coreboot_tables.h>
@@ -37,6 +39,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index fc9853d225e..75cef38741f 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <efi_loader.h>
 #include <hang.h>
@@ -28,6 +29,7 @@
 #include <asm/ptrace.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index b5d907126af..0f7129fb87e 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -25,6 +25,7 @@
 #include <asm/post.h>
 #include <asm/microcode.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/intel_common/fast_spi.c b/arch/x86/cpu/intel_common/fast_spi.c
index 5d3944dee2c..bb594645019 100644
--- a/arch/x86/cpu/intel_common/fast_spi.c
+++ b/arch/x86/cpu/intel_common/fast_spi.c
@@ -8,6 +8,7 @@
 #include <asm/cpu_common.h>
 #include <asm/fast_spi.h>
 #include <asm/pci.h>
+#include <linux/types.h>
 
 /*
  * Returns bios_start and fills in size of the BIOS region.
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index 732a4b4c4f4..0c20b5598f5 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -17,11 +17,13 @@
 #include <malloc.h>
 #include <p2sb.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/itss.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct itss_platdata {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 7eaea5c77c8..d6885b68303 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <pch.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
@@ -16,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index 157350a8949..aeb23d2941e 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -19,6 +19,7 @@
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/processor.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 8770546702b..16ce0127656 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <time.h>
@@ -23,6 +24,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static const char *const ecc_decoder[] = {
 	"inactive",
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 53e2f21df96..7a505b29fed 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -13,10 +13,12 @@
 #include <log.h>
 #include <p2sb.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <asm/pci.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define PCH_P2SB_E0		0xe0
 #define HIDE_BIT		BIT(0)
diff --git a/arch/x86/cpu/intel_common/pch.c b/arch/x86/cpu/intel_common/pch.c
index af82b64a13c..c30ba15855b 100644
--- a/arch/x86/cpu/intel_common/pch.c
+++ b/arch/x86/cpu/intel_common/pch.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <asm/pch_common.h>
+#include <asm/types.h>
 
 u32 pch_common_sir_read(struct udevice *dev, int idx)
 {
diff --git a/arch/x86/cpu/intel_common/report_platform.c b/arch/x86/cpu/intel_common/report_platform.c
index 9502b145490..28284ff2f7d 100644
--- a/arch/x86/cpu/intel_common/report_platform.c
+++ b/arch/x86/cpu/intel_common/report_platform.c
@@ -13,6 +13,7 @@
 #include <asm/arch/pch.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static void report_cpu_info(void)
 {
diff --git a/arch/x86/cpu/ioapic.c b/arch/x86/cpu/ioapic.c
index 4f99de6ece2..749ab1a22c3 100644
--- a/arch/x86/cpu/ioapic.c
+++ b/arch/x86/cpu/ioapic.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/ioapic.h>
 #include <asm/lapic.h>
+#include <asm/types.h>
 
 u32 io_apic_read(u32 reg)
 {
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 920a799ec8e..6755e8bb89b 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -19,6 +19,7 @@
 #include <asm/pirq_routing.h>
 #include <asm/tables.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 7df278ddbc4..0bc6f83665a 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -24,6 +24,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index b819bec8030..59daf5e6011 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -37,6 +37,7 @@
 #include <asm/arch/sandybridge.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c
index 9758c9a653d..143a0cda416 100644
--- a/arch/x86/cpu/ivybridge/early_me.c
+++ b/arch/x86/cpu/ivybridge/early_me.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static const char *const me_ack_values[] = {
 	[ME_HFS_ACK_NO_DID]	= "No DID Ack received",
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index 57c84435982..a901a21456f 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -23,6 +23,7 @@
 #include <asm/arch/pch.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 087754a1dd9..e4313a1811f 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
 #include <asm/cpu_x86.h>
@@ -25,6 +26,7 @@
 #include <asm/arch/model_206ax.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index 994f8a4ff6a..a0c4b29b664 100644
--- a/arch/x86/cpu/ivybridge/northbridge.c
+++ b/arch/x86/cpu/ivybridge/northbridge.c
@@ -19,6 +19,7 @@
 #include <asm/arch/pch.h>
 #include <asm/arch/model_206ax.h>
 #include <asm/arch/sandybridge.h>
+#include <asm/types.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 40cb0415868..b74f7a796d7 100644
--- a/arch/x86/cpu/ivybridge/sata.c
+++ b/arch/x86/cpu/ivybridge/sata.c
@@ -15,6 +15,7 @@
 #include <asm/pci.h>
 #include <asm/arch/pch.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index 78511e908e0..82074879575 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -40,6 +40,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index 7bf3935ba94..7225c3392bb 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
@@ -35,6 +36,7 @@
 #include <linux/kernel.h>
 #include <linux/linkage.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index da1f08eff81..cbc289888dc 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -27,6 +27,7 @@
 #include <asm/msr.h>
 #include <asm/mtrr.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/pci.c b/arch/x86/cpu/pci.c
index d4f9290ca73..04877094ad1 100644
--- a/arch/x86/cpu/pci.c
+++ b/arch/x86/cpu/pci.c
@@ -16,6 +16,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/pci.h>
+#include <linux/types.h>
 
 int pci_x86_read_config(pci_dev_t bdf, uint offset, ulong *valuep,
 			enum pci_size_t size)
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index aeb40f767e5..85c7b62a1f1 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -9,6 +9,7 @@
 #include <asm/post.h>
 #include <asm/arch/qemu.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index a38c4d3f01d..2ff1d79882b 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -15,6 +15,7 @@
 #include <asm/arch/device.h>
 #include <asm/arch/qemu.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static bool i440fx;
 
diff --git a/arch/x86/cpu/quark/acpi.c b/arch/x86/cpu/quark/acpi.c
index 655f2a1ce6a..013b1d943b1 100644
--- a/arch/x86/cpu/quark/acpi.c
+++ b/arch/x86/cpu/quark/acpi.c
@@ -9,6 +9,7 @@
 #include <asm/tables.h>
 #include <asm/arch/global_nvs.h>
 #include <asm/arch/iomap.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index b91d4603b69..38289905387 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -21,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/quark/hte.c b/arch/x86/cpu/quark/hte.c
index df14779357d..489208d0b9b 100644
--- a/arch/x86/cpu/quark/hte.c
+++ b/arch/x86/cpu/quark/hte.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <asm/arch/mrc.h>
 #include <asm/arch/msg_port.h>
+#include <asm/types.h>
 #include "mrc_util.h"
 #include "hte.h"
 
diff --git a/arch/x86/cpu/quark/hte.h b/arch/x86/cpu/quark/hte.h
index b4ea488f30f..322b556c22c 100644
--- a/arch/x86/cpu/quark/hte.h
+++ b/arch/x86/cpu/quark/hte.h
@@ -10,6 +10,7 @@
 #ifndef _HTE_H_
 #define _HTE_H_
 
+#include <asm/types.h>
 enum {
 	MRC_MEM_INIT,
 	MRC_MEM_TEST
diff --git a/arch/x86/cpu/quark/mrc.c b/arch/x86/cpu/quark/mrc.c
index cc29f72e745..af00b7b77fd 100644
--- a/arch/x86/cpu/quark/mrc.c
+++ b/arch/x86/cpu/quark/mrc.c
@@ -12,6 +12,7 @@
  *
  * These functions are generic and should work for any Quark-based board.
  *
+#include <linux/types.h>
  * MRC requires two data structures to be passed in which are initialized by
  * mrc_adjust_params().
  *
diff --git a/arch/x86/cpu/quark/mrc_util.c b/arch/x86/cpu/quark/mrc_util.c
index 6660568899f..1bec77beca1 100644
--- a/arch/x86/cpu/quark/mrc_util.c
+++ b/arch/x86/cpu/quark/mrc_util.c
@@ -15,6 +15,7 @@
 #include <asm/arch/msg_port.h>
 #include <asm/arch/quark.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "mrc_util.h"
 #include "hte.h"
 #include "smc.h"
diff --git a/arch/x86/cpu/quark/mrc_util.h b/arch/x86/cpu/quark/mrc_util.h
index f4e3e87b6c3..89d2f6351fd 100644
--- a/arch/x86/cpu/quark/mrc_util.h
+++ b/arch/x86/cpu/quark/mrc_util.h
@@ -12,6 +12,7 @@
 
 #include <log.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 /* Turn on this macro to enable MRC debugging output */
 #undef  MRC_DEBUG
diff --git a/arch/x86/cpu/quark/msg_port.c b/arch/x86/cpu/quark/msg_port.c
index d4f8c082ffc..f270eb7bb83 100644
--- a/arch/x86/cpu/quark/msg_port.c
+++ b/arch/x86/cpu/quark/msg_port.c
@@ -7,6 +7,7 @@
 #include <asm/arch/device.h>
 #include <asm/arch/msg_port.h>
 #include <asm/arch/quark.h>
+#include <asm/types.h>
 
 void msg_port_setup(int op, int port, int reg)
 {
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index 44529b6c2ec..2b91d69c34e 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -18,6 +18,7 @@
 #include <asm/arch/device.h>
 #include <asm/arch/msg_port.h>
 #include <asm/arch/quark.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/arch/x86/cpu/quark/smc.c b/arch/x86/cpu/quark/smc.c
index 584f2cfbaac..ae42b381243 100644
--- a/arch/x86/cpu/quark/smc.c
+++ b/arch/x86/cpu/quark/smc.c
@@ -15,6 +15,7 @@
 #include <asm/arch/msg_port.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "mrc_util.h"
 #include "hte.h"
 #include "smc.h"
diff --git a/arch/x86/cpu/quark/smc.h b/arch/x86/cpu/quark/smc.h
index eee27564c87..5c4917ee0b4 100644
--- a/arch/x86/cpu/quark/smc.h
+++ b/arch/x86/cpu/quark/smc.h
@@ -13,6 +13,7 @@
 /* System Memory Controller Register Defines */
 
 /* Memory Controller Message Bus Registers Offsets */
+#include <linux/types.h>
 #define DRP			0x00
 #define DTR0			0x01
 #define DTR1			0x02
diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
index 5601422d496..9573b9b5bea 100644
--- a/arch/x86/cpu/queensbay/tnc.c
+++ b/arch/x86/cpu/queensbay/tnc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/device-internal.h>
 #include <pci.h>
diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c
index 381a88124ff..0306e3b9616 100644
--- a/arch/x86/cpu/slimbootloader/sdram.c
+++ b/arch/x86/cpu/slimbootloader/sdram.c
@@ -12,6 +12,7 @@
 #include <linux/sizes.h>
 #include <asm/e820.h>
 #include <asm/arch/slimbootloader.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c
index 8aa5efdcab9..404c891de63 100644
--- a/arch/x86/cpu/tangier/acpi.c
+++ b/arch/x86/cpu/tangier/acpi.c
@@ -15,6 +15,7 @@
 #include <asm/tables.h>
 #include <asm/arch/global_nvs.h>
 #include <asm/arch/iomap.h>
+#include <asm/types.h>
 #include <dm/uclass-internal.h>
 #include <linux/string.h>
 
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index 41ad198a060..42c68278820 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -4,8 +4,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <dm/pinctrl.h>
 #include <dm/read.h>
 #include <regmap.h>
@@ -16,6 +18,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define BUFCFG_OFFSET				0x100
 
diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c
index 9605d776c4d..728722139d4 100644
--- a/arch/x86/cpu/tangier/sdram.c
+++ b/arch/x86/cpu/tangier/sdram.c
@@ -9,6 +9,7 @@
 #include <asm/e820.h>
 #include <asm/global_data.h>
 #include <asm/sfi.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
diff --git a/arch/x86/include/asm/acpi_nhlt.h b/arch/x86/include/asm/acpi_nhlt.h
index 47203213818..cf28370aa16 100644
--- a/arch/x86/include/asm/acpi_nhlt.h
+++ b/arch/x86/include/asm/acpi_nhlt.h
@@ -8,6 +8,7 @@
 #ifndef _NHLT_H_
 #define _NHLT_H_
 
+#include <linux/types.h>
 struct acpi_ctx;
 struct nhlt;
 struct nhlt_endpoint;
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 733085c1785..199d7314060 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -9,6 +9,7 @@
 #ifndef __ASM_ACPI_TABLE_H__
 #define __ASM_ACPI_TABLE_H__
 
+#include <linux/types.h>
 struct acpi_facs;
 struct acpi_fadt;
 struct acpi_global_nvs;
diff --git a/arch/x86/include/asm/arch-apollolake/fsp/fsp_m_upd.h b/arch/x86/include/asm/arch-apollolake/fsp/fsp_m_upd.h
index 5275b75f3b0..b8db24661e1 100644
--- a/arch/x86/include/asm/arch-apollolake/fsp/fsp_m_upd.h
+++ b/arch/x86/include/asm/arch-apollolake/fsp/fsp_m_upd.h
@@ -8,7 +8,9 @@
 #define	__ASM_ARCH_FSP_M_UDP_H
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <asm/fsp2/fsp_api.h>
+#include <asm/types.h>
 
 #define FSP_DRAM_CHANNELS	4
 
diff --git a/arch/x86/include/asm/arch-apollolake/fsp/fsp_s_upd.h b/arch/x86/include/asm/arch-apollolake/fsp/fsp_s_upd.h
index 451a7a254a4..85da4af7bc3 100644
--- a/arch/x86/include/asm/arch-apollolake/fsp/fsp_s_upd.h
+++ b/arch/x86/include/asm/arch-apollolake/fsp/fsp_s_upd.h
@@ -7,7 +7,9 @@
 #define __ASM_ARCH_FSP_S_UDP_H
 
 #ifndef __ASSEMBLY__
+#include <compiler.h>
 #include <asm/fsp2/fsp_api.h>
+#include <asm/types.h>
 
 /**
  * struct fsp_s_config - FSP-S configuration
diff --git a/arch/x86/include/asm/arch-apollolake/fsp_bindings.h b/arch/x86/include/asm/arch-apollolake/fsp_bindings.h
index b0510534c8a..b6c2d2f73f9 100644
--- a/arch/x86/include/asm/arch-apollolake/fsp_bindings.h
+++ b/arch/x86/include/asm/arch-apollolake/fsp_bindings.h
@@ -10,6 +10,7 @@
 #include <asm/arch/fsp/fsp_m_upd.h>
 #include <asm/arch/fsp/fsp_s_upd.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define ARRAY_SIZE_OF_MEMBER(s, m) (ARRAY_SIZE((((s *)0)->m)))
 #define SIZE_OF_MEMBER(s, m) (sizeof((((s *)0)->m)))
diff --git a/arch/x86/include/asm/arch-apollolake/global_nvs.h b/arch/x86/include/asm/arch-apollolake/global_nvs.h
index fe62194b02e..917d34621b9 100644
--- a/arch/x86/include/asm/arch-apollolake/global_nvs.h
+++ b/arch/x86/include/asm/arch-apollolake/global_nvs.h
@@ -10,6 +10,8 @@
 #ifndef _GLOBAL_NVS_H_
 #define _GLOBAL_NVS_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed acpi_global_nvs {
 	/* Miscellaneous */
 	u8	pcnt; /* 0x00 - Processor Count */
diff --git a/arch/x86/include/asm/arch-apollolake/lpc.h b/arch/x86/include/asm/arch-apollolake/lpc.h
index 977b7eccd88..c22e6903b8e 100644
--- a/arch/x86/include/asm/arch-apollolake/lpc.h
+++ b/arch/x86/include/asm/arch-apollolake/lpc.h
@@ -8,6 +8,7 @@
 #define _ASM_ARCH_LPC_H
 
 #include <linux/bitops.h>
+#include <linux/types.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/uart.h b/arch/x86/include/asm/arch-apollolake/uart.h
index d4fffe6525c..35e5d24b6f3 100644
--- a/arch/x86/include/asm/arch-apollolake/uart.h
+++ b/arch/x86/include/asm/arch-apollolake/uart.h
@@ -15,6 +15,7 @@
  * The UART won't actually work unless the GPIO settings are correct and the
  * signals actually exit the SoC. See board_debug_uart_init() for that.
  */
+#include <linux/types.h>
 int apl_uart_init(pci_dev_t bdf, ulong base);
 
 #endif
diff --git a/arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h b/arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h
index c6544ea409c..b561fb38e93 100644
--- a/arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h
+++ b/arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h
@@ -7,6 +7,8 @@
 #ifndef __FSP_VPD_H
 #define __FSP_VPD_H
 
+#include <compiler.h>
+#include <linux/types.h>
 struct memory_down_data {
 	uint8_t enable_memory_down;
 	uint8_t dram_speed;
diff --git a/arch/x86/include/asm/arch-baytrail/global_nvs.h b/arch/x86/include/asm/arch-baytrail/global_nvs.h
index 1072e3ddf40..777591b72c2 100644
--- a/arch/x86/include/asm/arch-baytrail/global_nvs.h
+++ b/arch/x86/include/asm/arch-baytrail/global_nvs.h
@@ -6,6 +6,8 @@
 #ifndef _GLOBAL_NVS_H_
 #define _GLOBAL_NVS_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed acpi_global_nvs {
 	u8	pcnt;		/* processor count */
 	u8	iuart_en;	/* internal UART enabled */
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 f2260ae90e8..eec075154d1 100644
--- a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
+++ b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
@@ -7,7 +7,9 @@
 #ifndef __FSP_VPD_H__
 #define __FSP_VPD_H__
 
+#include <compiler.h>
 #include <stddef.h>
+#include <asm/types.h>
 
 struct __packed memory_upd {
 	u64 signature;				/* Offset 0x0020 */
diff --git a/arch/x86/include/asm/arch-broadwell/gpio.h b/arch/x86/include/asm/arch-broadwell/gpio.h
index b5dd5ab4e7f..33cb942bcc8 100644
--- a/arch/x86/include/asm/arch-broadwell/gpio.h
+++ b/arch/x86/include/asm/arch-broadwell/gpio.h
@@ -9,6 +9,7 @@
 #define __ASM_ARCH_GPIO
 
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define GPIO_PER_BANK	32
 #define GPIO_BANKS	3
 
diff --git a/arch/x86/include/asm/arch-broadwell/me.h b/arch/x86/include/asm/arch-broadwell/me.h
index 58f16ba54c5..ceaa0f2bd31 100644
--- a/arch/x86/include/asm/arch-broadwell/me.h
+++ b/arch/x86/include/asm/arch-broadwell/me.h
@@ -8,7 +8,9 @@
 #ifndef _asm_arch_me_h
 #define _asm_arch_me_h
 
+#include <compiler.h>
 #include <asm/me_common.h>
+#include <asm/types.h>
 
 #define  ME_INIT_STATUS_SUCCESS_OTHER 3 /* SEE ME9 BWG */
 
diff --git a/arch/x86/include/asm/arch-broadwell/pch.h b/arch/x86/include/asm/arch-broadwell/pch.h
index 6b6f10ec6c8..9e991c35cc6 100644
--- a/arch/x86/include/asm/arch-broadwell/pch.h
+++ b/arch/x86/include/asm/arch-broadwell/pch.h
@@ -7,6 +7,7 @@
 #define __ASM_ARCH_PCH_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 
 #define PMBASE			0x40
 #define ACPI_CNTL		0x44
diff --git a/arch/x86/include/asm/arch-broadwell/pei_data.h b/arch/x86/include/asm/arch-broadwell/pei_data.h
index 4442beac5e4..5eee0502bba 100644
--- a/arch/x86/include/asm/arch-broadwell/pei_data.h
+++ b/arch/x86/include/asm/arch-broadwell/pei_data.h
@@ -8,7 +8,9 @@
 #ifndef ASM_ARCH_PEI_DATA_H
 #define ASM_ARCH_PEI_DATA_H
 
+#include <compiler.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 
 #define PEI_VERSION 22
 
diff --git a/arch/x86/include/asm/arch-broadwell/pm.h b/arch/x86/include/asm/arch-broadwell/pm.h
index df350808379..6a14ebecaae 100644
--- a/arch/x86/include/asm/arch-broadwell/pm.h
+++ b/arch/x86/include/asm/arch-broadwell/pm.h
@@ -8,6 +8,7 @@
 #ifndef __ASM_ARCH_PM_H
 #define __ASM_ARCH_PM_H
 
+#include <linux/types.h>
 #define PM1_STS			0x00
 #define  WAK_STS		(1 << 15)
 #define  PCIEXPWAK_STS		(1 << 14)
diff --git a/arch/x86/include/asm/arch-coreboot/sysinfo.h b/arch/x86/include/asm/arch-coreboot/sysinfo.h
index 419ec529335..f9096ba7c18 100644
--- a/arch/x86/include/asm/arch-coreboot/sysinfo.h
+++ b/arch/x86/include/asm/arch-coreboot/sysinfo.h
@@ -9,6 +9,7 @@
 #define _COREBOOT_SYSINFO_H
 
 #include <asm/coreboot_tables.h>
+#include <asm/types.h>
 
 /* Maximum number of memory range definitions */
 #define SYSINFO_MAX_MEM_RANGES	32
diff --git a/arch/x86/include/asm/arch-coreboot/timestamp.h b/arch/x86/include/asm/arch-coreboot/timestamp.h
index 85d42c02c46..d6db2ea0e5d 100644
--- a/arch/x86/include/asm/arch-coreboot/timestamp.h
+++ b/arch/x86/include/asm/arch-coreboot/timestamp.h
@@ -8,6 +8,7 @@
 #ifndef __COREBOOT_TIMESTAMP_H__
 #define __COREBOOT_TIMESTAMP_H__
 
+#include <linux/types.h>
 enum timestamp_id {
 	/* coreboot specific timestamp IDs */
 	TS_START_ROMSTAGE = 1,
diff --git a/arch/x86/include/asm/arch-ivybridge/fsp/fsp_configs.h b/arch/x86/include/asm/arch-ivybridge/fsp/fsp_configs.h
index ae9105b6ef1..2c290b5d293 100644
--- a/arch/x86/include/asm/arch-ivybridge/fsp/fsp_configs.h
+++ b/arch/x86/include/asm/arch-ivybridge/fsp/fsp_configs.h
@@ -6,6 +6,7 @@
 #ifndef __FSP_CONFIGS_H__
 #define __FSP_CONFIGS_H__
 
+#include <asm/types.h>
 struct platform_config {
 	u8 enable_ht;
 	u8 enable_turbo;
diff --git a/arch/x86/include/asm/arch-ivybridge/me.h b/arch/x86/include/asm/arch-ivybridge/me.h
index 518c308d59b..c832b029304 100644
--- a/arch/x86/include/asm/arch-ivybridge/me.h
+++ b/arch/x86/include/asm/arch-ivybridge/me.h
@@ -8,7 +8,9 @@
 #ifndef _ASM_INTEL_ME_H
 #define _ASM_INTEL_ME_H
 
+#include <compiler.h>
 #include <asm/me_common.h>
+#include <asm/types.h>
 
 struct __packed mbp_fw_version_name {
 	u32 major_version:16;
diff --git a/arch/x86/include/asm/arch-ivybridge/model_206ax.h b/arch/x86/include/asm/arch-ivybridge/model_206ax.h
index d2d28746974..3df4b37bb58 100644
--- a/arch/x86/include/asm/arch-ivybridge/model_206ax.h
+++ b/arch/x86/include/asm/arch-ivybridge/model_206ax.h
@@ -9,6 +9,7 @@
 #define _ASM_ARCH_MODEL_206AX_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 #define  CPUID_VMX			(1 << 5)
 #define  CPUID_SMX			(1 << 6)
 #define MSR_FEATURE_CONFIG		0x13c
diff --git a/arch/x86/include/asm/arch-ivybridge/pch.h b/arch/x86/include/asm/arch-ivybridge/pch.h
index 8018bc097d0..8630ec581e1 100644
--- a/arch/x86/include/asm/arch-ivybridge/pch.h
+++ b/arch/x86/include/asm/arch-ivybridge/pch.h
@@ -12,6 +12,7 @@
 #define _ASM_ARCH_PCH_H
 
 #include <pci.h>
+#include <asm/types.h>
 
 /* PCH types */
 #define PCH_TYPE_CPT	0x1c /* CougarPoint */
diff --git a/arch/x86/include/asm/arch-ivybridge/pei_data.h b/arch/x86/include/asm/arch-ivybridge/pei_data.h
index b8da21bed7b..6b7fd6ce460 100644
--- a/arch/x86/include/asm/arch-ivybridge/pei_data.h
+++ b/arch/x86/include/asm/arch-ivybridge/pei_data.h
@@ -6,7 +6,9 @@
 #ifndef ASM_ARCH_PEI_DATA_H
 #define ASM_ARCH_PEI_DATA_H
 
+#include <compiler.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 
 struct pch_usb3_controller_settings {
 	/* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
diff --git a/arch/x86/include/asm/arch-qemu/qemu.h b/arch/x86/include/asm/arch-qemu/qemu.h
index 061735b2985..8b0df2998b0 100644
--- a/arch/x86/include/asm/arch-qemu/qemu.h
+++ b/arch/x86/include/asm/arch-qemu/qemu.h
@@ -7,6 +7,7 @@
 #define _ARCH_QEMU_H_
 
 /* Programmable Attribute Map (PAM) Registers */
+#include <asm/types.h>
 #define I440FX_PAM		0x59
 #define Q35_PAM			0x90
 #define PAM_NUM			7
diff --git a/arch/x86/include/asm/arch-quark/global_nvs.h b/arch/x86/include/asm/arch-quark/global_nvs.h
index 6e99e6737dd..45c35dcaade 100644
--- a/arch/x86/include/asm/arch-quark/global_nvs.h
+++ b/arch/x86/include/asm/arch-quark/global_nvs.h
@@ -6,6 +6,8 @@
 #ifndef _GLOBAL_NVS_H_
 #define _GLOBAL_NVS_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed acpi_global_nvs {
 	u8	pcnt;		/* processor count */
 
diff --git a/arch/x86/include/asm/arch-quark/mrc.h b/arch/x86/include/asm/arch-quark/mrc.h
index 2353426cd6d..e817dba55c6 100644
--- a/arch/x86/include/asm/arch-quark/mrc.h
+++ b/arch/x86/include/asm/arch-quark/mrc.h
@@ -10,6 +10,7 @@
 #ifndef _MRC_H_
 #define _MRC_H_
 
+#include <linux/types.h>
 #define MRC_VERSION	0x0111
 
 /* architectural definitions */
diff --git a/arch/x86/include/asm/arch-quark/msg_port.h b/arch/x86/include/asm/arch-quark/msg_port.h
index 9527fdad3fd..093e8c7a14a 100644
--- a/arch/x86/include/asm/arch-quark/msg_port.h
+++ b/arch/x86/include/asm/arch-quark/msg_port.h
@@ -41,6 +41,7 @@
  * @port:   port number on the message bus
  * @reg:    register number within a port
  */
+#include <asm/types.h>
 void msg_port_setup(int op, int port, int reg);
 
 /**
diff --git a/arch/x86/include/asm/arch-quark/quark.h b/arch/x86/include/asm/arch-quark/quark.h
index feca1983ba8..7a42db59b1a 100644
--- a/arch/x86/include/asm/arch-quark/quark.h
+++ b/arch/x86/include/asm/arch-quark/quark.h
@@ -72,6 +72,7 @@
 #ifndef __ASSEMBLY__
 
 /* variable range MTRR usage */
+#include <asm/types.h>
 enum {
 	MTRR_VAR_ROM,
 	MTRR_VAR_ESRAM,
diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
index 7572fc7e40f..fe793efce94 100644
--- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
+++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
@@ -9,6 +9,8 @@
 #ifndef __VPDHEADER_H__
 #define __VPDHEADER_H__
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed upd_region {
 	u64	sign;			/* Offset 0x0000 */
 	u64	reserved;		/* Offset 0x0008 */
diff --git a/arch/x86/include/asm/arch-queensbay/tnc.h b/arch/x86/include/asm/arch-queensbay/tnc.h
index 8d151509ab9..70d810959a7 100644
--- a/arch/x86/include/asm/arch-queensbay/tnc.h
+++ b/arch/x86/include/asm/arch-queensbay/tnc.h
@@ -7,6 +7,7 @@
 #define _X86_ARCH_TNC_H_
 
 /* IGD Function Disable Register */
+#include <asm/types.h>
 #define IGD_FD		0xc4
 #define FUNC_DISABLE	0x00000001
 
diff --git a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
index 05dd1b2b447..05c683445ec 100644
--- a/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
+++ b/arch/x86/include/asm/arch-slimbootloader/slimbootloader.h
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/hob.h>
+#include <asm/types.h>
 
 /**
  * A GUID to get MemoryMap info hob which is provided by Slim Bootloader
diff --git a/arch/x86/include/asm/arch-tangier/global_nvs.h b/arch/x86/include/asm/arch-tangier/global_nvs.h
index a7811a331a1..31794b9d3c1 100644
--- a/arch/x86/include/asm/arch-tangier/global_nvs.h
+++ b/arch/x86/include/asm/arch-tangier/global_nvs.h
@@ -8,6 +8,8 @@
 #ifndef _GLOBAL_NVS_H_
 #define _GLOBAL_NVS_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed acpi_global_nvs {
 	u8	pcnt;		/* processor count */
 
diff --git a/arch/x86/include/asm/bootm.h b/arch/x86/include/asm/bootm.h
index 231d11340ca..61e66b51db6 100644
--- a/arch/x86/include/asm/bootm.h
+++ b/arch/x86/include/asm/bootm.h
@@ -7,6 +7,7 @@
 #define ARM_BOOTM_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 void bootm_announce_and_cleanup(void);
 
 /**
diff --git a/arch/x86/include/asm/coreboot_tables.h b/arch/x86/include/asm/coreboot_tables.h
index 7e1576768be..5db5f8d00c5 100644
--- a/arch/x86/include/asm/coreboot_tables.h
+++ b/arch/x86/include/asm/coreboot_tables.h
@@ -8,6 +8,8 @@
 #ifndef _COREBOOT_TABLES_H
 #define _COREBOOT_TABLES_H
 
+#include <compiler.h>
+#include <linux/types.h>
 struct memory_area;
 
 struct cbuint64 {
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 21a05dab7de..a0ecce304cf 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -10,6 +10,7 @@
 #ifndef _ASM_CPU_H
 #define _ASM_CPU_H
 
+#include <linux/types.h>
 enum {
 	X86_VENDOR_INVALID = 0,
 	X86_VENDOR_INTEL,
diff --git a/arch/x86/include/asm/cpu_common.h b/arch/x86/include/asm/cpu_common.h
index 67d150b8d91..526d3fbcbab 100644
--- a/arch/x86/include/asm/cpu_common.h
+++ b/arch/x86/include/asm/cpu_common.h
@@ -9,6 +9,7 @@
 #define __ASM_CPU_COMMON_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 
 /* Standard Intel bus clock is fixed at 100MHz */
 enum {
diff --git a/arch/x86/include/asm/early_cmos.h b/arch/x86/include/asm/early_cmos.h
index 543a9e69f03..42dca5a0787 100644
--- a/arch/x86/include/asm/early_cmos.h
+++ b/arch/x86/include/asm/early_cmos.h
@@ -7,6 +7,7 @@
 #define __EARLY_CMOS_H
 
 /* CMOS actually resides in the RTC SRAM */
+#include <asm/types.h>
 #define CMOS_IO_PORT	0x70
 
 /**
diff --git a/arch/x86/include/asm/fast_spi.h b/arch/x86/include/asm/fast_spi.h
index ed436a89113..0a059bf0b1e 100644
--- a/arch/x86/include/asm/fast_spi.h
+++ b/arch/x86/include/asm/fast_spi.h
@@ -9,6 +9,7 @@
 #include <pci.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
 struct fast_spi_regs {
diff --git a/arch/x86/include/asm/fsp/fsp_api.h b/arch/x86/include/asm/fsp/fsp_api.h
index 4941e2d74f0..1a0d3f8ffa5 100644
--- a/arch/x86/include/asm/fsp/fsp_api.h
+++ b/arch/x86/include/asm/fsp/fsp_api.h
@@ -6,6 +6,7 @@
 #ifndef __ASM_FSP_API_H
 #define __ASM_FSP_API_H
 
+#include <asm/types.h>
 #include <linux/linkage.h>
 
 enum fsp_phase {
diff --git a/arch/x86/include/asm/fsp/fsp_azalia.h b/arch/x86/include/asm/fsp/fsp_azalia.h
index e59180bdae2..9b71c79f7b5 100644
--- a/arch/x86/include/asm/fsp/fsp_azalia.h
+++ b/arch/x86/include/asm/fsp/fsp_azalia.h
@@ -7,6 +7,8 @@
 #ifndef _FSP_AZALIA_H_
 #define _FSP_AZALIA_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct __packed azalia_verb_table_header {
 	u32 vendor_device_id;
 	u16 sub_system_id;
diff --git a/arch/x86/include/asm/fsp/fsp_fv.h b/arch/x86/include/asm/fsp/fsp_fv.h
index 7492c87c34a..862627f137f 100644
--- a/arch/x86/include/asm/fsp/fsp_fv.h
+++ b/arch/x86/include/asm/fsp/fsp_fv.h
@@ -8,6 +8,7 @@
 #define __FSP_FV___
 
 #include <efi.h>
+#include <asm/types.h>
 
 /* Value of EFI_FV_FILE_ATTRIBUTES */
 #define EFI_FV_FILE_ATTR_ALIGNMENT	0x0000001F
diff --git a/arch/x86/include/asm/fsp/fsp_hob.h b/arch/x86/include/asm/fsp/fsp_hob.h
index d248520e972..d2eeecf2e39 100644
--- a/arch/x86/include/asm/fsp/fsp_hob.h
+++ b/arch/x86/include/asm/fsp/fsp_hob.h
@@ -7,7 +7,9 @@
 #ifndef __FSP_HOB_H__
 #define __FSP_HOB_H__
 
+#include <compiler.h>
 #include <asm/hob.h>
+#include <asm/types.h>
 
 enum pixel_format {
 	pixel_rgbx_8bpc,	/* RGB 8 bit per color */
diff --git a/arch/x86/include/asm/fsp/fsp_infoheader.h b/arch/x86/include/asm/fsp/fsp_infoheader.h
index e72c052ed1e..691c135ae35 100644
--- a/arch/x86/include/asm/fsp/fsp_infoheader.h
+++ b/arch/x86/include/asm/fsp/fsp_infoheader.h
@@ -7,6 +7,8 @@
 #ifndef _FSP_HEADER_H_
 #define _FSP_HEADER_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 #define FSP_HEADER_OFF	0x94	/* Fixed FSP header offset in the FSP image */
 
 struct __packed fsp_header {
diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h
index 29e511415cd..8d1fc0ef296 100644
--- a/arch/x86/include/asm/fsp/fsp_support.h
+++ b/arch/x86/include/asm/fsp/fsp_support.h
@@ -14,6 +14,7 @@
 #include <asm/fsp/fsp_types.h>
 #include <asm/fsp_arch.h>
 #include <asm/fsp/fsp_azalia.h>
+#include <asm/types.h>
 
 #define FSP_LOWMEM_BASE		0x100000UL
 #define FSP_HIGHMEM_BASE	0x100000000ULL
diff --git a/arch/x86/include/asm/fsp1/fsp_api.h b/arch/x86/include/asm/fsp1/fsp_api.h
index 524da5feb75..e4881d6a93d 100644
--- a/arch/x86/include/asm/fsp1/fsp_api.h
+++ b/arch/x86/include/asm/fsp1/fsp_api.h
@@ -7,6 +7,7 @@
 #ifndef __FSP1_API_H__
 #define __FSP1_API_H__
 
+#include <asm/types.h>
 #include <linux/linkage.h>
 #include <asm/fsp/fsp_api.h>
 /*
diff --git a/arch/x86/include/asm/fsp1/fsp_ffs.h b/arch/x86/include/asm/fsp1/fsp_ffs.h
index b7558e5a17f..6447ab96a70 100644
--- a/arch/x86/include/asm/fsp1/fsp_ffs.h
+++ b/arch/x86/include/asm/fsp1/fsp_ffs.h
@@ -8,6 +8,8 @@
 #define __FSP_FFS_H__
 
 /* Used to verify the integrity of the file */
+#include <compiler.h>
+#include <asm/types.h>
 union __packed ffs_integrity {
 	struct {
 		/*
diff --git a/arch/x86/include/asm/fsp1/fsp_support.h b/arch/x86/include/asm/fsp1/fsp_support.h
index a44a5504a4f..cec7db49811 100644
--- a/arch/x86/include/asm/fsp1/fsp_support.h
+++ b/arch/x86/include/asm/fsp1/fsp_support.h
@@ -8,6 +8,7 @@
 #define __FSP1_SUPPORT_H__
 
 #include <asm/fsp/fsp_support.h>
+#include <asm/types.h>
 #include "fsp_ffs.h"
 
 /**
diff --git a/arch/x86/include/asm/fsp2/fsp_api.h b/arch/x86/include/asm/fsp2/fsp_api.h
index 16ffb1922cd..28f4b97ae01 100644
--- a/arch/x86/include/asm/fsp2/fsp_api.h
+++ b/arch/x86/include/asm/fsp2/fsp_api.h
@@ -9,8 +9,10 @@
 #ifndef __ASM_FSP2_API_H
 #define __ASM_FSP2_API_H
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/fsp/fsp_api.h>
+#include <asm/types.h>
 
 struct fspm_upd;
 struct fsps_upd;
diff --git a/arch/x86/include/asm/fsp2/fsp_internal.h b/arch/x86/include/asm/fsp2/fsp_internal.h
index 720d677c05d..6ab78bf053b 100644
--- a/arch/x86/include/asm/fsp2/fsp_internal.h
+++ b/arch/x86/include/asm/fsp2/fsp_internal.h
@@ -9,6 +9,7 @@
 #define __ASM_FSP_INTERNAL_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct binman_entry;
 struct fsp_header;
 struct fspm_upd;
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 7fcd21ee2d5..8987df975c9 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -9,9 +9,11 @@
 
 #ifndef __ASSEMBLY__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/processor.h>
 #include <asm/mrccache.h>
+#include <linux/types.h>
 
 enum pei_boot_mode_t {
 	PEI_BOOT_NONE = 0,
diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h
index 58e4d7b831e..7810aee155f 100644
--- a/arch/x86/include/asm/gpio.h
+++ b/arch/x86/include/asm/gpio.h
@@ -7,6 +7,7 @@
 #define _X86_GPIO_H_
 
 #include <asm-generic/gpio.h>
+#include <linux/types.h>
 
 struct ich6_bank_platdata {
 	uint16_t base_addr;
diff --git a/arch/x86/include/asm/handoff.h b/arch/x86/include/asm/handoff.h
index aec49b9b815..5f6691939eb 100644
--- a/arch/x86/include/asm/handoff.h
+++ b/arch/x86/include/asm/handoff.h
@@ -9,6 +9,8 @@
 #ifndef __x86_asm_handoff_h
 #define __x86_asm_handoff_h
 
+#include <linux/types.h>
+
 /**
  * struct arch_spl_handoff - architecture-specific handoff info
  *
diff --git a/arch/x86/include/asm/hob.h b/arch/x86/include/asm/hob.h
index a58f422de72..4860179a33f 100644
--- a/arch/x86/include/asm/hob.h
+++ b/arch/x86/include/asm/hob.h
@@ -10,6 +10,7 @@
 #include <efi.h>
 #include <efi_loader.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 /* Type of HOB Header */
 #define HOB_TYPE_MEM_ALLOC	0x0002
diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h
index bae5d22b883..060e5b5f9be 100644
--- a/arch/x86/include/asm/intel_pinctrl.h
+++ b/arch/x86/include/asm/intel_pinctrl.h
@@ -12,6 +12,7 @@
 #include <stdbool.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 /**
  * struct pad_config - config for a pad
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index f0119c47b85..7d6d6ded999 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -9,6 +9,7 @@
 
 #include <compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * This file contains the definitions for the x86 IO instructions
diff --git a/arch/x86/include/asm/ioapic.h b/arch/x86/include/asm/ioapic.h
index 9e004e9b5b0..c4106c9b721 100644
--- a/arch/x86/include/asm/ioapic.h
+++ b/arch/x86/include/asm/ioapic.h
@@ -8,6 +8,7 @@
 #ifndef __ASM_IOAPIC_H
 #define __ASM_IOAPIC_H
 
+#include <asm/types.h>
 #define IO_APIC_ADDR		0xfec00000
 
 /* Direct addressed register */
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 2f5de45dff1..81cacd59908 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -7,6 +7,7 @@
 #define _ARCH_IRQ_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dt-bindings/interrupt-router/intel-irq.h>
 
 /**
diff --git a/arch/x86/include/asm/me_common.h b/arch/x86/include/asm/me_common.h
index 56e328846cf..44f99b32b6a 100644
--- a/arch/x86/include/asm/me_common.h
+++ b/arch/x86/include/asm/me_common.h
@@ -12,6 +12,7 @@
 #ifndef __ASM_ME_COMMON_H
 #define __ASM_ME_COMMON_H
 
+#include <compiler.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
 #include <linux/types.h>
diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
index 4ab75049315..5598cefb0be 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -9,6 +9,7 @@
 #ifndef __ASSEMBLY__
 
 /* This is a declaration for ucode_base in start.S */
+#include <asm/types.h>
 extern u32 ucode_base;
 extern u32 ucode_size;
 
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h
index a25f8f03a12..377f94b204e 100644
--- a/arch/x86/include/asm/mpspec.h
+++ b/arch/x86/include/asm/mpspec.h
@@ -13,6 +13,7 @@
  * Intel MultiProcessor Specification 1.4
  */
 
+#include <linux/types.h>
 #define MPSPEC_V14	4
 
 #define MPF_SIGNATURE	"_MP_"
diff --git a/arch/x86/include/asm/mrc_common.h b/arch/x86/include/asm/mrc_common.h
index f060389f789..ec5f7ab84f9 100644
--- a/arch/x86/include/asm/mrc_common.h
+++ b/arch/x86/include/asm/mrc_common.h
@@ -8,6 +8,7 @@
 
 #include <stdbool.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 
 /**
  * mrc_common_init() - Set up SDRAM
diff --git a/arch/x86/include/asm/mrccache.h b/arch/x86/include/asm/mrccache.h
index 8b104a2f0b8..2f41e003dba 100644
--- a/arch/x86/include/asm/mrccache.h
+++ b/arch/x86/include/asm/mrccache.h
@@ -8,6 +8,7 @@
 #define _ASM_MRCCACHE_H
 
 #include <compiler.h>
+#include <asm/types.h>
 
 #define MRC_DATA_ALIGN		0x100
 #define MRC_DATA_SIGNATURE	(('M' << 0) | ('R' << 8) | \
diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
index 73edb4d86d3..cb5abbcc908 100644
--- a/arch/x86/include/asm/mtrr.h
+++ b/arch/x86/include/asm/mtrr.h
@@ -60,6 +60,8 @@
 
 #if !defined(__ASSEMBLY__)
 
+#include <linux/types.h>
+
 /**
  * Information about the previous MTRR state, set up by mtrr_open()
  *
diff --git a/arch/x86/include/asm/pch_common.h b/arch/x86/include/asm/pch_common.h
index c4614d3f42c..713630de1bd 100644
--- a/arch/x86/include/asm/pch_common.h
+++ b/arch/x86/include/asm/pch_common.h
@@ -7,6 +7,7 @@
 #define __asm_pch_common_h
 
 /* Common Intel SATA registers */
+#include <asm/types.h>
 #define SATA_SIRI		0xa0 /* SATA Indexed Register Index */
 #define SATA_SIRD		0xa4 /* SATA Indexed Register Data */
 #define SATA_SP			0xd0 /* Scratchpad */
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index 2a720735728..1a5319185de 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -28,6 +28,7 @@
  * @size:	Access size
  * @return 0 if OK, -ve on error
  */
+#include <linux/types.h>
 int pci_x86_read_config(pci_dev_t bdf, uint offset, ulong *valuep,
 			enum pci_size_t size);
 
diff --git a/arch/x86/include/asm/pirq_routing.h b/arch/x86/include/asm/pirq_routing.h
index 895fa793ef4..679ed750e2a 100644
--- a/arch/x86/include/asm/pirq_routing.h
+++ b/arch/x86/include/asm/pirq_routing.h
@@ -18,7 +18,9 @@
  *
  * CAUTION: If you change this, PIRQ routing will not work correctly.
  */
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #define MAX_INTX_ENTRIES	4
 
 #define PIRQ_SIGNATURE		\
diff --git a/arch/x86/include/asm/pnp_def.h b/arch/x86/include/asm/pnp_def.h
index 0345d195c69..560f26098d6 100644
--- a/arch/x86/include/asm/pnp_def.h
+++ b/arch/x86/include/asm/pnp_def.h
@@ -10,6 +10,7 @@
 #define _ASM_PNP_DEF_H_
 
 #include <asm/io.h>
+#include <linux/types.h>
 
 #define PNP_IDX_EN   0x30
 #define PNP_IDX_IO0  0x60
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index d7b68367861..3eb16fd11d6 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -41,6 +41,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 static inline __attribute__((always_inline)) void cpu_hlt(void)
 {
 	asm("hlt");
diff --git a/arch/x86/include/asm/scu.h b/arch/x86/include/asm/scu.h
index f5ec5a19d9d..75c2cbae6b7 100644
--- a/arch/x86/include/asm/scu.h
+++ b/arch/x86/include/asm/scu.h
@@ -6,6 +6,7 @@
 #define _X86_ASM_SCU_IPC_H_
 
 /* IPC defines the following message types */
+#include <asm/types.h>
 #define IPCMSG_INDIRECT_READ	0x02
 #define IPCMSG_INDIRECT_WRITE	0x05
 #define IPCMSG_WARM_RESET	0xf0
diff --git a/arch/x86/include/asm/sfi.h b/arch/x86/include/asm/sfi.h
index 09d47008120..6725ea69b2e 100644
--- a/arch/x86/include/asm/sfi.h
+++ b/arch/x86/include/asm/sfi.h
@@ -6,6 +6,7 @@
 #ifndef _LINUX_SFI_H
 #define _LINUX_SFI_H
 
+#include <compiler.h>
 #include <errno.h>
 #include <linux/types.h>
 
diff --git a/arch/x86/include/asm/sipi.h b/arch/x86/include/asm/sipi.h
index 24834225287..9e11f20e030 100644
--- a/arch/x86/include/asm/sipi.h
+++ b/arch/x86/include/asm/sipi.h
@@ -13,6 +13,8 @@
 #ifndef __ASSEMBLY__
 
 /**
+#include <compiler.h>
+#include <asm/types.h>
  * struct sipi_params_16bit - 16-bit SIPI entry-point parameters
  *
  * These are set up in the same space as the SIPI 16-bit code so that each AP
diff --git a/arch/x86/include/asm/speedstep.h b/arch/x86/include/asm/speedstep.h
index 43bfabffcc9..513e4107c82 100644
--- a/arch/x86/include/asm/speedstep.h
+++ b/arch/x86/include/asm/speedstep.h
@@ -10,6 +10,7 @@
 #define _ASM_SPEEDSTEP_H
 
 /* Magic value used to locate speedstep configuration in the device tree */
+#include <linux/types.h>
 #define SPEEDSTEP_APIC_MAGIC 0xACAC
 
 /* MWAIT coordination I/O base address. This must match
diff --git a/arch/x86/include/asm/spl.h b/arch/x86/include/asm/spl.h
index cc6cac08f23..8d844f664d9 100644
--- a/arch/x86/include/asm/spl.h
+++ b/arch/x86/include/asm/spl.h
@@ -7,6 +7,7 @@
 #ifndef __asm_spl_h
 #define __asm_spl_h
 
+#include <linux/types.h>
 #define CONFIG_SPL_BOARD_LOAD_IMAGE
 
 enum {
diff --git a/arch/x86/include/asm/tables.h b/arch/x86/include/asm/tables.h
index f7c72ed3db0..92ccaf4c7f5 100644
--- a/arch/x86/include/asm/tables.h
+++ b/arch/x86/include/asm/tables.h
@@ -7,6 +7,7 @@
 #define _X86_TABLES_H_
 
 #include <tables_csum.h>
+#include <linux/types.h>
 
 #define ROM_TABLE_ADDR	CONFIG_ROM_TABLE_ADDR
 #define ROM_TABLE_END	(CONFIG_ROM_TABLE_ADDR + CONFIG_ROM_TABLE_SIZE - 1)
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index d732661f6d4..114a8cf5582 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -7,6 +7,7 @@
 #ifndef _U_BOOT_I386_H_
 #define _U_BOOT_I386_H_	1
 
+#include <linux/types.h>
 struct global_data;
 
 extern char gdt_rom[];
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h
index 80e128ccf36..df232e336f6 100644
--- a/arch/x86/include/asm/zimage.h
+++ b/arch/x86/include/asm/zimage.h
@@ -9,6 +9,7 @@
 
 #include <asm/bootparam.h>
 #include <asm/e820.h>
+#include <linux/types.h>
 
 /* linux i386 zImage/bzImage header. Offsets relative to
  * the start of the image */
diff --git a/arch/x86/lib/acpi.c b/arch/x86/lib/acpi.c
index ffdc9e8257e..166a3f4256e 100644
--- a/arch/x86/lib/acpi.c
+++ b/arch/x86/lib/acpi.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/tables.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *rsdp)
 {
diff --git a/arch/x86/lib/acpi_nhlt.c b/arch/x86/lib/acpi_nhlt.c
index f21d3e32b57..041248e7c8f 100644
--- a/arch/x86/lib/acpi_nhlt.c
+++ b/arch/x86/lib/acpi_nhlt.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define NHLT_RID		1
 #define NHLT_SSID		1
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index db184006830..6fb12c03d24 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu.h>
 #include <dm.h>
 #include <log.h>
@@ -29,6 +30,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * IASL compiles the dsdt entries and writes the hex values
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index a4499972c32..5a8daa1d322 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/post.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "bios.h"
 
 /* Interrupt handlers for each interrupt the ROM can call */
diff --git a/arch/x86/lib/bios.h b/arch/x86/lib/bios.h
index 2e51b9fbf67..4c44c0fc905 100644
--- a/arch/x86/lib/bios.h
+++ b/arch/x86/lib/bios.h
@@ -19,6 +19,9 @@
 
 #else
 
+#include <compiler.h>
+#include <linux/types.h>
+
 /* Convert a symbol address to our real mode area */
 #define PTR_TO_REAL_MODE(sym)\
 	(void *)(REALMODE_BASE + ((char *)&(sym) - (char *)&asm_realmode_code))
diff --git a/arch/x86/lib/bios_interrupts.c b/arch/x86/lib/bios_interrupts.c
index 2582ac1b840..dcdb0e9690b 100644
--- a/arch/x86/lib/bios_interrupts.c
+++ b/arch/x86/lib/bios_interrupts.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <asm/pci.h>
+#include <asm/types.h>
 #include "bios_emul.h"
 
 /* errors go in AH. Just set these up so that word assigns will work */
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 0b20cdc16ab..302d2c1b5c9 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -22,6 +22,7 @@
 #include <fdt_support.h>
 #include <image.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <asm/bootparam.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c
index b128b43cebe..fa26fe80652 100644
--- a/arch/x86/lib/cmd_boot.c
+++ b/arch/x86/lib/cmd_boot.c
@@ -20,6 +20,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot-x86.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index f4736ecfc45..b98b9d8b2df 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/div64.c b/arch/x86/lib/div64.c
index 2bea205f60f..a8a3d36f511 100644
--- a/arch/x86/lib/div64.c
+++ b/arch/x86/lib/div64.c
@@ -7,6 +7,8 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
+#include <linux/stddef.h>
 
 union overlay64 {
 	u64 longw;
diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c
index 066bf9b154b..4cc55c1c2f3 100644
--- a/arch/x86/lib/e820.c
+++ b/arch/x86/lib/e820.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <efi_loader.h>
 #include <asm/e820.h>
 #include <asm/global_data.h>
diff --git a/arch/x86/lib/early_cmos.c b/arch/x86/lib/early_cmos.c
index f7b3bb2a8e1..821abe160a4 100644
--- a/arch/x86/lib/early_cmos.c
+++ b/arch/x86/lib/early_cmos.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <asm/early_cmos.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 u8 cmos_read8(u8 addr)
 {
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index c7775cc33c0..cbbda284209 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -19,6 +19,7 @@
 #include <asm/post.h>
 #include <asm/processor.h>
 #include <asm/fsp/fsp_support.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 70aa7bbf885..05520d8f69b 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -15,6 +15,7 @@
 #include <asm/post.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 6e4368d4184..292af2abe90 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -13,6 +13,7 @@
 #include <asm/fsp/fsp_support.h>
 #include <asm/global_data.h>
 #include <asm/mtrr.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index fd4d98ef627..8afdb1b287b 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/post.h>
+#include <asm/types.h>
 
 u32 fsp_get_usable_lowmem_top(const void *hob_list)
 {
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index 74181a78b69..98a048ee2a6 100644
--- a/arch/x86/lib/fsp1/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -8,6 +8,7 @@
 #include <asm/fsp/fsp_support.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 int dram_init(void)
 {
diff --git a/arch/x86/lib/fsp1/fsp_support.c b/arch/x86/lib/fsp1/fsp_support.c
index acaaf55bcc7..2bd60cf1469 100644
--- a/arch/x86/lib/fsp1/fsp_support.c
+++ b/arch/x86/lib/fsp1/fsp_support.c
@@ -9,6 +9,7 @@
 #include <vsprintf.h>
 #include <asm/fsp1/fsp_support.h>
 #include <asm/post.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index 693f3cf0323..4c204c84e05 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -19,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 int dram_init(void)
 {
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index eef321d6208..07bbf6cc06f 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -19,6 +19,7 @@
 #include <dm/uclass-internal.h>
 #include <asm/fsp2/fsp_internal.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int arch_cpu_init_dm(void)
 {
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 509483dcad3..13fa0558315 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -23,6 +23,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int prepare_mrc_cache_type(enum mrc_type_t type,
 				  struct mrc_data_container **cachep)
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index 4ab49c5fe6f..326808dd6d6 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -21,6 +21,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int fsp_silicon_init(bool s3wake, bool use_spi_flash)
 {
diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index f597f752213..8c6445b2ebd 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -8,12 +8,14 @@
 #include <dm.h>
 #include <log.h>
 #include <spi_flash.h>
+#include <stdbool.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/fsp2/fsp_internal.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* The amount of the FSP header to probe to obtain what we need */
 #define PROBE_BUF_SIZE 0x180
diff --git a/arch/x86/lib/hob.c b/arch/x86/lib/hob.c
index f2c47240ee8..5c10b655a6f 100644
--- a/arch/x86/lib/hob.c
+++ b/arch/x86/lib/hob.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <asm/hob.h>
+#include <linux/types.h>
 
 /**
  * Returns the next instance of a HOB type from the starting HOB.
diff --git a/arch/x86/lib/i8254.c b/arch/x86/lib/i8254.c
index 33c63233ad0..2010cfe6f94 100644
--- a/arch/x86/lib/i8254.c
+++ b/arch/x86/lib/i8254.c
@@ -9,6 +9,7 @@
 #include <asm/i8254.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define TIMER1_VALUE		18	/* 15.6us */
 #define BEEP_FREQUENCY_HZ	440
diff --git a/arch/x86/lib/i8259.c b/arch/x86/lib/i8259.c
index c002d103aef..cb396b8ac3e 100644
--- a/arch/x86/lib/i8259.c
+++ b/arch/x86/lib/i8259.c
@@ -20,6 +20,7 @@
 #include <asm/i8259.h>
 #include <asm/ibmpc.h>
 #include <asm/interrupt.h>
+#include <asm/types.h>
 
 int i8259_init(void)
 {
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index a3fcade2ffd..ab9c49fc435 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <asm/interrupt.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #if !CONFIG_IS_ENABLED(X86_64)
 
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 17568a03d5c..2dc658cdb37 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -6,11 +6,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/cpu.h>
 #include <asm/global_data.h>
 #include <asm/irq.h>
@@ -22,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 63aace5d4fb..e6742b65cfb 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index 71039589dfd..6409d5c1c11 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -16,6 +16,7 @@
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index 53228cd2848..2cace9c5b42 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.c
@@ -18,6 +18,7 @@
 #include <asm/pci.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c
index 3b5ee3837f8..d6b435efd6d 100644
--- a/arch/x86/lib/pirq_routing.c
+++ b/arch/x86/lib/pirq_routing.c
@@ -8,12 +8,14 @@
 #include <common.h>
 #include <log.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/pci.h>
 #include <asm/pirq_routing.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/pmu.c b/arch/x86/lib/pmu.c
index 314d9f0ecee..ce054cc4cee 100644
--- a/arch/x86/lib/pmu.c
+++ b/arch/x86/lib/pmu.c
@@ -10,6 +10,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/pmu.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/x86/lib/ramtest.c b/arch/x86/lib/ramtest.c
index 3cae664e49c..bbe24ad46ca 100644
--- a/arch/x86/lib/ramtest.c
+++ b/arch/x86/lib/ramtest.c
@@ -9,6 +9,7 @@
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/post.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 static void write_phys(unsigned long addr, u32 value)
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index e31565a589e..6f587034556 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -24,6 +24,7 @@
 #include <asm/sections.h>
 #include <elf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/scu.c b/arch/x86/lib/scu.c
index 792b87c2f1b..c476d12c149 100644
--- a/arch/x86/lib/scu.c
+++ b/arch/x86/lib/scu.c
@@ -16,6 +16,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/scu.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/x86/lib/sfi.c b/arch/x86/lib/sfi.c
index b85a1b17e84..cbba94c8bb2 100644
--- a/arch/x86/lib/sfi.c
+++ b/arch/x86/lib/sfi.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct table_info {
 	u32 base;
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 4efd96a6ba0..bcc099f4b6c 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <dm.h>
@@ -28,6 +29,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index 6fd0ded397d..7409eb3b819 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -16,6 +16,7 @@
 #include <asm/coreboot_tables.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * Function prototype to write a specific configuration table
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 3213b2749ec..a4459dfeecd 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
@@ -20,6 +21,7 @@
 #include <asm-generic/sections.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 5e413200268..f0c97b6cf89 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -34,6 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Memory lay-out:
diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c
index 16f44774a3e..60a0cb1357a 100644
--- a/arch/xtensa/cpu/cpu.c
+++ b/arch/xtensa/cpu/cpu.c
@@ -19,6 +19,7 @@
 #include <asm/cache.h>
 #include <asm/string.h>
 #include <asm/misc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/xtensa/include/asm/ldscript.h b/arch/xtensa/include/asm/ldscript.h
index 08f5d0135ed..fdf38c225d0 100644
--- a/arch/xtensa/include/asm/ldscript.h
+++ b/arch/xtensa/include/asm/ldscript.h
@@ -8,6 +8,7 @@
 #define _XTENSA_LDSCRIPT_H
 
 /*
+#include <linux/kernel.h>
  * This linker script is pre-processed with CPP to avoid hard-coding
  * addresses that depend on the Xtensa core configuration, because
  * this FPGA board can be used with a huge variety of Xtensa cores.
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 0299534728c..00b5e0a4656 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/addrspace.h>
diff --git a/arch/xtensa/lib/cache.c b/arch/xtensa/lib/cache.c
index 4e0c0acc3bb..f0f7ea2d330 100644
--- a/arch/xtensa/lib/cache.c
+++ b/arch/xtensa/lib/cache.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
+#include <linux/types.h>
 
 /*
  * We currently run always with caches enabled when running from memory.
diff --git a/arch/xtensa/lib/relocate.c b/arch/xtensa/lib/relocate.c
index ffe39d4a03c..7fc9cf76f6e 100644
--- a/arch/xtensa/lib/relocate.c
+++ b/arch/xtensa/lib/relocate.c
@@ -7,6 +7,7 @@
 #include <asm/sections.h>
 #include <asm/string.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int clear_bss(void)
 {
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 3a02c384934..af37eddd51d 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index 69611c78832..49ca9a835bd 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -18,6 +18,7 @@
 #include <asm/u-boot.h>
 #include <linux/io.h>
 #include <faraday/ftsmc020.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index 9ba4f732223..2d88db3186f 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -18,6 +18,7 @@
 #include <linux/io.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
+#include <linux/types.h>
 
 #include <faraday/ftsmc020.h>
 
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index b75e968ee1d..4575e8929ef 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <spl.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index 2cd51d0aa87..f0b0ac1494c 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 static ulong fwenv_addr[MAX_FWENV_ADDR];
 const char mystrerr[] = "ERROR: Failed to save factory info";
diff --git a/board/Arcturus/ucp1020/ddr.c b/board/Arcturus/ucp1020/ddr.c
index ff56fe7df50..ba65dc51afd 100644
--- a/board/Arcturus/ucp1020/ddr.c
+++ b/board/Arcturus/ucp1020/ddr.c
@@ -19,6 +19,7 @@
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_DDR_RAW_TIMING
 #if defined(CONFIG_UCP1020) || defined(CONFIG_UCP1020T1)
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index 9a6b465bf96..8cbe9006254 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -24,6 +24,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Arcturus/ucp1020/spl_minimal.c b/board/Arcturus/ucp1020/spl_minimal.c
index 718139688bf..f938e345ac1 100644
--- a/board/Arcturus/ucp1020/spl_minimal.c
+++ b/board/Arcturus/ucp1020/spl_minimal.c
@@ -17,6 +17,7 @@
 #include <asm/fsl_law.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c
index ccd5f8ae1e4..ce10bdaab69 100644
--- a/board/Arcturus/ucp1020/ucp1020.c
+++ b/board/Arcturus/ucp1020/ucp1020.c
@@ -44,6 +44,7 @@
 #include <asm/fsl_lbc.h>
 #include <asm/mp.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ucp1020.h"
 
 void spi_set_speed(struct spi_slave *slave, uint hz)
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index 2c4feb98ae9..80b6f2eefc7 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -30,6 +30,7 @@
 #include <asm/gpio.h>
 #include <i2c.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
 #include <watchdog.h>
diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c
index be5474832a0..d0da60d9539 100644
--- a/board/BuR/brppt2/board.c
+++ b/board/BuR/brppt2/board.c
@@ -26,6 +26,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define USBHUB_RSTN	IMX_GPIO_NR(1, 16)
 #define BKLT_EN		IMX_GPIO_NR(1, 15)
diff --git a/board/BuR/brsmarc1/board.c b/board/BuR/brsmarc1/board.c
index a069bd4cbf6..240ecb17056 100644
--- a/board/BuR/brsmarc1/board.c
+++ b/board/BuR/brsmarc1/board.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/emif.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c
index 9c2e080d6d3..f2b4c43ed90 100644
--- a/board/BuR/brxre1/board.c
+++ b/board/BuR/brxre1/board.c
@@ -28,6 +28,7 @@
 #include <asm/emif.h>
 #include <asm/gpio.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c
index 6bbea816a0e..b6f7cf38fd4 100644
--- a/board/BuR/common/br_resetc.c
+++ b/board/BuR/common/br_resetc.c
@@ -6,10 +6,12 @@
  * B&R Industrial Automation GmbH - http://www.br-automation.com/ *
  */
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <errno.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <dm/uclass.h>
 #include <linux/delay.h>
 #include "br_resetc.h"
diff --git a/board/BuR/common/br_resetc.h b/board/BuR/common/br_resetc.h
index ba0689bf205..66aa12798b2 100644
--- a/board/BuR/common/br_resetc.h
+++ b/board/BuR/common/br_resetc.h
@@ -8,6 +8,7 @@
 #ifndef __CONFIG_BRRESETC_H__
 #define __CONFIG_BRRESETC_H__
 #include <common.h>
+#include <asm/types.h>
 
 int br_resetc_regget(u8 reg, u8 *dst);
 int br_resetc_regset(u8 reg, u8 val);
diff --git a/board/BuR/common/bur_common.h b/board/BuR/common/bur_common.h
index 4db630668e2..a76f17d0ef7 100644
--- a/board/BuR/common/bur_common.h
+++ b/board/BuR/common/bur_common.h
@@ -17,6 +17,7 @@
 int load_lcdtiming(struct am335x_lcdpanel *panel);
 #endif
 
+#include <asm/types.h>
 void br_summaryscreen(void);
 void pmicsetup(u32 mpupll, unsigned int bus);
 void enable_uart0_pin_mux(void);
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 9b96b0c30b9..2456501b7ab 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -18,6 +18,7 @@
 #include <lcd.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index 863372e06e0..2d816927482 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "asm/m5282.h"
 #include <bmp_layout.h>
 #include <env.h>
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index c15f8ee5b51..4521e703ed8 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -10,6 +10,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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/mox_sp.h b/board/CZ.NIC/turris_mox/mox_sp.h
index 49a4ed80ea6..45e7f24a607 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.h
+++ b/board/CZ.NIC/turris_mox/mox_sp.h
@@ -7,6 +7,7 @@
 #define _BOARD_CZNIC_TURRIS_MOX_MOX_SP_H_
 
 #include <common.h>
+#include <asm/types.h>
 
 const char *mox_sp_get_ecdsa_public_key(void);
 int mbox_sp_get_board_info(u64 *sn, u8 *mac1, u8 *mac2, int *bv,
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 0c7926b5624..b34bde8a294 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -25,6 +25,7 @@
 #include <linux/libfdt.h>
 #include <linux/string.h>
 #include <miiphy.h>
+#include <linux/types.h>
 #include <mvebu/comphy.h>
 #include <spi.h>
 
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 9e3013d2615..c61eb802624 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -15,6 +15,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -28,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 # include <atsha204a-i2c.h>
 
diff --git a/board/LaCie/common/common.c b/board/LaCie/common/common.c
index 325bc9b3bf7..395c10758cb 100644
--- a/board/LaCie/common/common.c
+++ b/board/LaCie/common/common.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
 
diff --git a/board/LaCie/common/common.h b/board/LaCie/common/common.h
index bf75d0a0978..43cb59c8ff7 100644
--- a/board/LaCie/common/common.h
+++ b/board/LaCie/common/common.h
@@ -14,4 +14,5 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr);
 int lacie_read_mac_address(uchar *mac);
 #endif
 
+#include <linux/types.h>
 #endif /* _LACIE_COMMON_H */
diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index 1e13f506b5a..122f51d45fe 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -12,6 +12,7 @@
 #include <net.h>
 #include <asm/arch/orion5x.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "../common/common.h"
 #include <spl.h>
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index fb1128bb61d..a83d7fa3b49 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -23,6 +23,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "net2big_v2.h"
 #include "../common/common.h"
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index 3246e5d0dc0..32325bb465d 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -20,6 +20,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/arch/gpio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include "netspace_v2.h"
 #include "../common/common.h"
diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
index 78ba8f4b61c..9eb440230c7 100644
--- a/board/Marvell/aspenite/aspenite.c
+++ b/board/Marvell/aspenite/aspenite.c
@@ -14,6 +14,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
 #include <asm/arch/armada100.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
index 43cbe2416d6..d7c7d67dbb0 100644
--- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -4,6 +4,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
index 0fa0820d7be..b49121e426d 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index b18ac9c2d0b..ef9f3aa7ed2 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
index 39a1a52f704..8a8167503dd 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 
diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
index 8605f5324f4..85e37940fd3 100644
--- a/board/Marvell/dreamplug/dreamplug.c
+++ b/board/Marvell/dreamplug/dreamplug.c
@@ -17,6 +17,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "dreamplug.h"
 
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index 8909fba8837..7de585f74c5 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -23,6 +23,7 @@
 #include <asm/gpio.h>
 #include <miiphy.h>
 #include <asm/mach-types.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index dba94106f53..71aa35f9d7f 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "guruplug.h"
 
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index eb0fe5b3727..cd73b0e9b9a 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c
index e407238562f..4a45480ccf5 100644
--- a/board/Marvell/mvebu_armada-8k/board.c
+++ b/board/Marvell/mvebu_armada-8k/board.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index a451db9bff8..89a9b2c1a8b 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -20,6 +20,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "openrd.h"
 
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index 0211323e679..f6ff65c0b4d 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "sheevaplug.h"
 
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 22ef37d567f..2bf380988d2 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -20,6 +20,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "dockstar.h"
 
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index b11d5becb1f..1c19b72ad27 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -23,6 +23,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
index b448acfb4b2..0673248d039 100644
--- a/board/Seagate/nas220/nas220.c
+++ b/board/Seagate/nas220/nas220.c
@@ -19,6 +19,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index 91d6ba52a66..e8d7de58dab 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
diff --git a/board/Synology/ds109/ds109.h b/board/Synology/ds109/ds109.h
index cc6ef991f39..a91c90683fa 100644
--- a/board/Synology/ds109/ds109.h
+++ b/board/Synology/ds109/ds109.h
@@ -8,6 +8,7 @@
 #ifndef __DS109_H
 #define __DS109_H
 
+#include <asm/types.h>
 #define DS109_OE_LOW			(0)
 #define DS109_OE_HIGH			(0)
 #define DS109_OE_VAL_LOW		((1 << 22)|(1 << 23))
diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c
index f6a434d08c9..39e28291d75 100644
--- a/board/Synology/ds414/cmd_syno.c
+++ b/board/Synology/ds414/cmd_syno.c
@@ -16,6 +16,7 @@
 #include <vsprintf.h>
 #include <linux/mtd/mtd.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include "../drivers/ddr/marvell/axp/ddr3_init.h"
diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
index b2e9bc4ae39..d43373f7674 100644
--- a/board/Synology/ds414/ds414.c
+++ b/board/Synology/ds414/ds414.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c
index 9ef7ed6e7f4..44fe5f6910f 100644
--- a/board/abilis/tb100/tb100.c
+++ b/board/abilis/tb100/tb100.c
@@ -9,6 +9,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 void reset_cpu(ulong addr)
 {
diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c
index 42bfa740f1b..80f86e669bc 100644
--- a/board/advantech/dms-ba16/dms-ba16.c
+++ b/board/advantech/dms-ba16/dms-ba16.c
@@ -33,6 +33,7 @@
 #include <input.h>
 #include <pwm.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 DECLARE_GLOBAL_DATA_PTR;
 
 #define NC_PAD_CTRL (PAD_CTL_PUS_100K_UP |	\
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index 3394126b7ae..6e4330bd322 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -22,6 +22,7 @@
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 8776a94ff07..4ef3609e4d4 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -14,6 +14,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/gpio.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 c2eda4ff44b..b7362d9f0ff 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
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/fsp1/fsp_support.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 /* ALC262 Verb Table - 10EC0262 */
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index b8ed9f513c6..a11e2a2ae9e 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
index 3a91decbb76..18b48d905cd 100644
--- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
+++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
@@ -11,6 +11,7 @@
 #include <netdev.h>
 #include <led.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index 112dbd0bea5..39a24de9923 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -13,6 +13,7 @@
 #include <wdt.h>
 #include <asm/global_data.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/board/altera/arria5-socdk/qts/pinmux_config.h b/board/altera/arria5-socdk/qts/pinmux_config.h
index 78a03258249..a80d9429007 100644
--- a/board/altera/arria5-socdk/qts/pinmux_config.h
+++ b/board/altera/arria5-socdk/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/altera/arria5-socdk/qts/sdram_config.h b/board/altera/arria5-socdk/qts/sdram_config.h
index 927a7a4f8e0..3519c3a204a 100644
--- a/board/altera/arria5-socdk/qts/sdram_config.h
+++ b/board/altera/arria5-socdk/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/altera/cyclone5-socdk/qts/pinmux_config.h b/board/altera/cyclone5-socdk/qts/pinmux_config.h
index ec64ae17a16..1426db42bea 100644
--- a/board/altera/cyclone5-socdk/qts/pinmux_config.h
+++ b/board/altera/cyclone5-socdk/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/altera/cyclone5-socdk/qts/sdram_config.h b/board/altera/cyclone5-socdk/qts/sdram_config.h
index 8adbfec11f9..3607260e25f 100644
--- a/board/altera/cyclone5-socdk/qts/sdram_config.h
+++ b/board/altera/cyclone5-socdk/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index a1b179d1a3c..783a0a18e12 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <init.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
diff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c
index 005e4bebf13..c7a174080ef 100644
--- a/board/amlogic/odroid-n2/odroid-n2.c
+++ b/board/amlogic/odroid-n2/odroid-n2.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/sm.h>
 #include <asm/arch/eth.h>
+#include <linux/types.h>
 
 #define EFUSE_MAC_OFFSET	20
 #define EFUSE_MAC_SIZE		12
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index 8f1bf8bfda4..dfa0d0f834a 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sm.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/mem.h>
+#include <linux/types.h>
 
 #define EFUSE_SN_OFFSET		20
 #define EFUSE_SN_SIZE		16
diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
index 597bb71cbf7..27e1caae024 100644
--- a/board/amlogic/p201/p201.c
+++ b/board/amlogic/p201/p201.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sm.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/mem.h>
+#include <linux/types.h>
 
 #define EFUSE_SN_OFFSET		20
 #define EFUSE_SN_SIZE		16
diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
index fbc49e95651..8ce9ff70aa9 100644
--- a/board/amlogic/p212/p212.c
+++ b/board/amlogic/p212/p212.c
@@ -14,6 +14,7 @@
 #include <asm/arch/sm.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/mem.h>
+#include <linux/types.h>
 
 #define EFUSE_SN_OFFSET		20
 #define EFUSE_SN_SIZE		16
diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
index 62e6fa3d199..8cd367cb384 100644
--- a/board/amlogic/q200/q200.c
+++ b/board/amlogic/q200/q200.c
@@ -14,6 +14,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/sm.h>
 #include <asm/arch/eth.h>
+#include <linux/types.h>
 
 #define EFUSE_SN_OFFSET		20
 #define EFUSE_SN_SIZE		16
diff --git a/board/aries/mcvevk/qts/pinmux_config.h b/board/aries/mcvevk/qts/pinmux_config.h
index 85f892ae473..c4b8c501b23 100644
--- a/board/aries/mcvevk/qts/pinmux_config.h
+++ b/board/aries/mcvevk/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	3, /* EMACIO0 */
 	3, /* EMACIO1 */
diff --git a/board/aries/mcvevk/qts/sdram_config.h b/board/aries/mcvevk/qts/sdram_config.h
index fd72926a89e..9275164f148 100644
--- a/board/aries/mcvevk/qts/sdram_config.h
+++ b/board/aries/mcvevk/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index dcc8df0be14..433238c64b5 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -39,6 +39,7 @@
 #include <led.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/da9063_pmic.h>
diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c
index 67f0941a640..3199d123161 100644
--- a/board/armadeus/apf27/apf27.c
+++ b/board/armadeus/apf27/apf27.c
@@ -21,6 +21,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include "apf27.h"
 #include "fpga.h"
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index a85ac69962b..7c1e02645ce 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include "arm-ebi.h"
diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c
index 28efc33f1f4..5f03a81e348 100644
--- a/board/armltd/integrator/pci.c
+++ b/board/armltd/integrator/pci.c
@@ -24,6 +24,7 @@
 #include <log.h>
 #include <pci.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include "integrator-sc.h"
diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c
index 53d1c0ec303..102c413b511 100644
--- a/board/armltd/integrator/timer.c
+++ b/board/armltd/integrator/timer.c
@@ -20,6 +20,7 @@
 #include <div64.h>
 #include <time.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_ARCH_CINTEGRATOR
 #define DIV_CLOCK_INIT	1
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index ee9f61f2b7a..013a70a3cb9 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -33,6 +33,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../drivers/mmc/arm_pl180_mmci.h"
 
 static struct systimer *systimer_base = (struct systimer *)V2M_TIMER01;
diff --git a/board/armltd/vexpress/vexpress_tc2.c b/board/armltd/vexpress/vexpress_tc2.c
index 75f9d820349..cbb0a4e51fe 100644
--- a/board/armltd/vexpress/vexpress_tc2.c
+++ b/board/armltd/vexpress/vexpress_tc2.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <asm/armv7.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <common.h>
 #include <linux/libfdt.h>
diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c
index 1ad320df3a9..ad10f5ce5ed 100644
--- a/board/armltd/vexpress64/pcie.c
+++ b/board/armltd/vexpress64/pcie.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <pci_ids.h>
 #include <linux/delay.h>
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 2a44828d6e6..300cb44f8e9 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -5,6 +5,7 @@
  * Sharma Bhupesh <bhupesh.sharma at freescale.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
@@ -19,6 +20,7 @@
 #include <linux/compiler.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "pcie.h"
 #include <asm/armv8/mmu.h>
 
diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c
index 871700ebfe8..91ae8c528d6 100644
--- a/board/astro/mcf5373l/fpga.c
+++ b/board/astro/mcf5373l/fpga.c
@@ -23,6 +23,7 @@
 #include <command.h>
 #include <asm/immap_5329.h>
 #include <asm/io.h>
+#include <linux/types.h>
 #include "fpga.h"
 
 int altera_pre_fn(int cookie)
diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c
index 3eabf924c4a..38616036bb7 100644
--- a/board/astro/mcf5373l/mcf5373l.c
+++ b/board/astro/mcf5373l/mcf5373l.c
@@ -16,6 +16,7 @@
 #include <asm/m5329.h>
 #include <asm/immap_5329.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /* needed for astro bus: */
diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
index 9520be30529..a097db7d472 100644
--- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
+++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
@@ -32,6 +32,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/rmobile.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define s_init_wait(cnt) \
 		({	\
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c
index 5838e36c7a4..a085c1b448e 100644
--- a/board/atmel/at91rm9200ek/at91rm9200ek.c
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -19,6 +19,7 @@
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/at91_common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
index 3a36a23a4d3..728909cc7a1 100644
--- a/board/atmel/at91sam9261ek/at91sam9261ek.c
+++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
@@ -26,6 +26,7 @@
 #endif
 #include <asm/mach-types.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index 5960c1862ce..423612fc9dc 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -26,6 +26,7 @@
 #include <lcd.h>
 #include <atmel_lcdc.h>
 #include <asm/mach-types.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index 7f728125c06..44a09095749 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -23,6 +23,7 @@
 #include <linux/mtd/rawnand.h>
 #include <atmel_lcdc.h>
 #include <asm/mach-types.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 75d5ffa88ae..5e87553df02 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -21,6 +21,7 @@
 #include <atmel_hlcdc.h>
 #include <netdev.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_LCD_INFO
 #include <nand.h>
diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c
index 6f3debe3f37..498a44340ad 100644
--- a/board/atmel/at91sam9rlek/at91sam9rlek.c
+++ b/board/atmel/at91sam9rlek/at91sam9rlek.c
@@ -20,6 +20,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <lcd.h>
 #include <atmel_lcdc.h>
diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c
index 44abbfabb07..ba509fc5622 100644
--- a/board/atmel/common/board.c
+++ b/board/atmel/common/board.c
@@ -10,6 +10,7 @@
 #include <vsprintf.h>
 #include <w1.h>
 #include <w1-eeprom.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 
 #define AT91_PDA_EEPROM_ID_OFFSET		15
diff --git a/board/atmel/common/mac-spi-nor.c b/board/atmel/common/mac-spi-nor.c
index 67bfd3785b7..e631b98a6d4 100644
--- a/board/atmel/common/mac-spi-nor.c
+++ b/board/atmel/common/mac-spi-nor.c
@@ -13,6 +13,7 @@
 #include <linux/mtd/spi-nor.h>
 #include <netdev.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define ETH_ADDR_SIZE			6
 
diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
index b3f876c6e58..c3c0b481f44 100644
--- a/board/atmel/common/video_display.c
+++ b/board/atmel/common/video_display.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clk.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
index 0f8ce6d29c0..b68cb88342c 100644
--- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
+++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/sama5d2.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 extern void at91_pda_detect(void);
diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
index b8d02c4639b..05e45c22bd3 100644
--- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
+++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
@@ -17,6 +17,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/sama5d2.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 extern void at91_pda_detect(void);
diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c
index 889a09fd855..6fa433732e3 100644
--- a/board/atmel/sama5d2_icp/sama5d2_icp.c
+++ b/board/atmel/sama5d2_icp/sama5d2_icp.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/sama5d2.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 4dbd9d63e2c..b1ceb835896 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/sama5d2.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 extern void at91_pda_detect(void);
diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
index 8956abfced4..2ac5f917fbd 100644
--- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
+++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
@@ -17,6 +17,7 @@
 #include <spl.h>
 #include <asm/arch/atmel_mpddrc.h>
 #include <asm/arch/at91_wdt.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c
index 9e1caafb952..9387809635d 100644
--- a/board/atmel/sama5d3xek/sama5d3xek.c
+++ b/board/atmel/sama5d3xek/sama5d3xek.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clk.h>
 #include <debug_uart.h>
 #include <env.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <spl.h>
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
index f021276c6df..89e4b6b005b 100644
--- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
+++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/sama5d4.h>
 #include <debug_uart.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c
index 8f4a91cbaed..faed89b23e8 100644
--- a/board/atmel/sama5d4ek/sama5d4ek.c
+++ b/board/atmel/sama5d4ek/sama5d4ek.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/sama5d4.h>
 #include <debug_uart.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c
index 1b509835d76..af6c2bd93cc 100644
--- a/board/avionic-design/common/tamonten-ng.c
+++ b/board/avionic-design/common/tamonten-ng.c
@@ -12,6 +12,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinmux-config-tamonten-ng.h"
 #include <i2c.h>
 
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index 47b592117d5..acf108a89db 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -32,6 +32,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
index 297d5a72b0e..f0abb977bdc 100644
--- a/board/bachmann/ot1200/ot1200_spl.c
+++ b/board/bachmann/ot1200/ot1200_spl.c
@@ -8,6 +8,7 @@
 #include <spl.h>
 #include <asm/arch/mx6-ddr.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Configure MX6Q/DUAL mmdc DDR io registers */
 static struct mx6dq_iomux_ddr_regs ot1200_ddr_ioregs = {
diff --git a/board/barco/platinum/spl_picon.c b/board/barco/platinum/spl_picon.c
index a023ddca33c..8796620914f 100644
--- a/board/barco/platinum/spl_picon.c
+++ b/board/barco/platinum/spl_picon.c
@@ -20,6 +20,7 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "platinum.h"
 
diff --git a/board/barco/platinum/spl_titanium.c b/board/barco/platinum/spl_titanium.c
index 0395d197448..aa63037eb08 100644
--- a/board/barco/platinum/spl_titanium.c
+++ b/board/barco/platinum/spl_titanium.c
@@ -20,6 +20,7 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "platinum.h"
 
diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
index cd362db58a9..4aa2322fde5 100644
--- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c
+++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
@@ -9,6 +9,7 @@
 #include <asm/arch/rcar-mstp.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index 8ea6fe9d733..4af0a31d086 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c
index 4a8bc4a78dc..ca34a7ed1bb 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -21,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum LED_GPIOS {
 	GPIO_SD1_CD = IMX_GPIO_NR(1, 1),
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020_video.c b/board/beckhoff/mx53cx9020/mx53cx9020_video.c
index 3be2cd5f0ff..d4a9fa12fdc 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020_video.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020_video.c
@@ -12,6 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/video.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define CX9020_DVI_PWD	IMX_GPIO_NR(6, 1)
 
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 2d4437fbfe0..d1694954759 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -27,6 +27,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <env.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/mii.h>
diff --git a/board/bluegiga/apx4devkit/spl_boot.c b/board/bluegiga/apx4devkit/spl_boot.c
index d8ee1d0a63e..ececbcc8911 100644
--- a/board/bluegiga/apx4devkit/spl_boot.c
+++ b/board/bluegiga/apx4devkit/spl_boot.c
@@ -21,6 +21,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_GPMI	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index da597bbfb0a..ff4d61fe23d 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -39,6 +39,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_GURNARD_SPLASH
 #include "splash_logo.h"
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index ac8665fc77b..9213cefa2b6 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -40,6 +40,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/tps65217.h>
 #include <env_internal.h>
 #include <watchdog.h>
diff --git a/board/bosch/shc/board.h b/board/bosch/shc/board.h
index 997595bf42b..bdbd6d1260a 100644
--- a/board/bosch/shc/board.h
+++ b/board/bosch/shc/board.h
@@ -15,6 +15,7 @@
 #define _BOARD_H_
 
 /* Definition to control the GPIOs (for LEDs and Reset) */
+#include <linux/types.h>
 #define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
 
 static inline int board_is_b_sample(void)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index c5a522aea25..761a64812d4 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -40,6 +40,7 @@
 #include <netdev.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c
index 3776d00b8d8..9efa3158ab7 100644
--- a/board/broadcom/bcm_ep/board.c
+++ b/board/broadcom/bcm_ep/board.c
@@ -16,6 +16,7 @@
 #include <asm/system.h>
 #include <asm/iproc-common/armpll.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c
index 4ced6609086..de7c88292a0 100644
--- a/board/broadcom/bcmns2/northstar2.c
+++ b/board/broadcom/bcmns2/northstar2.c
@@ -10,6 +10,7 @@
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static struct mm_region ns2_mem_map[] = {
 	{
diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c
index ac9ca20f8ad..711fee16f7a 100644
--- a/board/broadcom/bcmns3/ns3.c
+++ b/board/broadcom/bcmns3/ns3.c
@@ -14,6 +14,7 @@
 #include <asm/arch-bcmns3/bl33_info.h>
 #include <dt-bindings/memory/bcm-ns3-mc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Default reset-level = 3 and strap-val = 0 */
 #define L3_RESET	30
diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
index f033b6d19ec..889dbf6c69e 100644
--- a/board/bticino/mamoj/spl.c
+++ b/board/bticino/mamoj/spl.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <linux/sizes.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index e1670a4265d..55a52e55198 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -28,6 +28,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include "lsxl.h"
 
diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c
index f0b20c518c0..c90b93849bd 100644
--- a/board/cadence/xtfpga/xtfpga.c
+++ b/board/cadence/xtfpga/xtfpga.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/platform_data/net_ethoc.h>
 #include <env.h>
diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index 1c91cfe5f06..eabb753e97f 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/ptrace.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/system.h>
 #include <cavium/thunderx_svc.h>
diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index 71444324f31..2aa5b716c41 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 #include <cavium/atf.h>
 #include <asm/armv8/mmu.h>
diff --git a/board/ccv/xpress/spl.c b/board/ccv/xpress/spl.c
index 357945eea1a..a82fa821c77 100644
--- a/board/ccv/xpress/spl.c
+++ b/board/ccv/xpress/spl.c
@@ -12,6 +12,7 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Configuration for IM IME1G16D3EEBG-15EI, 64M x 16 -> 128MiB */
 
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index dfc71ba91be..060b8372b78 100644
--- a/board/ccv/xpress/xpress.c
+++ b/board/ccv/xpress/xpress.c
@@ -27,6 +27,7 @@
 #include <mmc.h>
 #include <netdev.h>
 #include <usb.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index d33861f229c..6b4dc61de28 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -27,6 +27,7 @@
 #include <asm/mach-types.h>
 #include <asm/arch/ep93xx.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
index 631ba5b7af7..11abac2a70a 100644
--- a/board/cloudengines/pogo_e02/pogo_e02.c
+++ b/board/cloudengines/pogo_e02/pogo_e02.c
@@ -19,6 +19,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "pogo_e02.h"
 
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index f1874e35ff4..09a2a14b67f 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -14,6 +14,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
 #define FLASH_BANK_SIZE 0x200000
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 28f4859f649..1846c9bf4cf 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -20,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c
index d75951615be..b00d7c9052f 100644
--- a/board/compulab/cl-som-imx7/spl.c
+++ b/board/compulab/cl-som-imx7/spl.c
@@ -19,6 +19,7 @@
 #include <asm/arch-mx7/mx7-ddr.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "common.h"
 
 #ifdef CONFIG_FSL_ESDHC_IMX
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index b3862fcf3a7..b7401748899 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -42,6 +42,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 a66e6016237..e0f995762e5 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -24,6 +24,7 @@
 #include <fsl_esdhc_imx.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.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 26ba6711c93..ee9f93a735a 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -18,6 +18,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware_am33xx.h>
diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c
index c035f364310..4a1afd3727b 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -15,6 +15,7 @@
 #include <asm/emif.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/tps65218.h>
 #include "board.h"
diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c
index 14a37b0f568..6665ee1f840 100644
--- a/board/compulab/cm_t43/spl.c
+++ b/board/compulab/cm_t43/spl.c
@@ -11,6 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr_defs.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <power/pmic.h>
 #include <power/tps65218.h>
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index 7021e73b082..cae98d2597f 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -6,11 +6,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <asm/bootm.h>
 #include <asm/gpio.h>
 #include <asm/setup.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include "common.h"
diff --git a/board/compulab/common/common.h b/board/compulab/common/common.h
index 17cfbb6f27a..cc3c9dace24 100644
--- a/board/compulab/common/common.h
+++ b/board/compulab/common/common.h
@@ -8,6 +8,7 @@
 #ifndef _CL_COMMON_
 #define _CL_COMMON_
 
+#include <asm/types.h>
 #include <linux/errno.h>
 
 void cl_print_pcb_info(void);
diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
index cc190103c4c..7b772b0c104 100644
--- a/board/compulab/common/eeprom.c
+++ b/board/compulab/common/eeprom.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "eeprom.h"
 
 #ifndef CONFIG_SYS_I2C_EEPROM_ADDR
diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h
index 5e5aa41074d..373087a86ce 100644
--- a/board/compulab/common/eeprom.h
+++ b/board/compulab/common/eeprom.h
@@ -10,6 +10,7 @@
 #define _EEPROM_
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_I2C
 int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
diff --git a/board/compulab/common/omap3_display.c b/board/compulab/common/omap3_display.c
index 61641aa8375..1af06666603 100644
--- a/board/compulab/common/omap3_display.c
+++ b/board/compulab/common/omap3_display.c
@@ -20,6 +20,7 @@
 #include <asm/arch-omap3/dss.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum display_type {
 	NONE,
diff --git a/board/compulab/common/omap3_smc911x.c b/board/compulab/common/omap3_smc911x.c
index a6a03bc5823..f5d92553fb9 100644
--- a/board/compulab/common/omap3_smc911x.c
+++ b/board/compulab/common/omap3_smc911x.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 6b37c27fabc..f56875734e9 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -34,6 +35,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <linux/fb.h>
diff --git a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c
index f43a027fa39..f22b0ef13bf 100644
--- a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c
+++ b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <asm/ibmpc.h>
 #include <asm/pnp_def.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 int board_early_init_f(void)
diff --git a/board/corscience/tricorder/led.c b/board/corscience/tricorder/led.c
index d876dd7b9f5..80387cd8116 100644
--- a/board/corscience/tricorder/led.c
+++ b/board/corscience/tricorder/led.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
+#include <linux/types.h>
 
 #define TRICORDER_STATUS_LED_YELLOW 42
 #define TRICORDER_STATUS_LED_GREEN  43
diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c
index e239eeea145..6444c096fbf 100644
--- a/board/corscience/tricorder/tricorder-eeprom.c
+++ b/board/corscience/tricorder/tricorder-eeprom.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <eeprom.h>
 #include <i2c.h>
@@ -13,6 +14,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #include "tricorder-eeprom.h"
diff --git a/board/corscience/tricorder/tricorder-eeprom.h b/board/corscience/tricorder/tricorder-eeprom.h
index 7107b02a2c1..4906d241f09 100644
--- a/board/corscience/tricorder/tricorder-eeprom.h
+++ b/board/corscience/tricorder/tricorder-eeprom.h
@@ -7,7 +7,9 @@
 #ifndef TRICORDER_EEPROM_H_
 #define TRICORDER_EEPROM_H_
 
+#include <compiler.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 #define TRICORDER_EEPROM_MAGIC 0xc2a94f52
 #define TRICORDER_EEPROM_VERSION 1
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index 08b8e7f4d04..2d918acbe04 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -25,6 +25,7 @@
 #include <asm/arch/mem.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tricorder.h"
 #include "tricorder-eeprom.h"
 
diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
index 4fe6251e009..fd4189d90fd 100644
--- a/board/cortina/presidio-asic/presidio.c
+++ b/board/cortina/presidio-asic/presidio.c
@@ -19,6 +19,7 @@
 #include <asm/psci.h>
 #include <cpu_func.h>
 #include <asm/armv8/mmu.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/creative/xfi3/spl_boot.c b/board/creative/xfi3/spl_boot.c
index dd31156e445..b88ddcefe2e 100644
--- a/board/creative/xfi3/spl_boot.c
+++ b/board/creative/xfi3/spl_boot.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_EMI	(MXS_PAD_1V8 | MXS_PAD_12MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_SSP	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index 825a613aee4..ce5ff83e084 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -24,6 +24,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c
index 3bcbfd5a794..489ff297b4a 100644
--- a/board/cssi/MCR3000/MCR3000.c
+++ b/board/cssi/MCR3000/MCR3000.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <hwconfig.h>
 #include <init.h>
@@ -22,6 +23,7 @@
 #include <wdt.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/cssi/MCR3000/nand.c b/board/cssi/MCR3000/nand.c
index 15a10bffadc..383ac4e1e73 100644
--- a/board/cssi/MCR3000/nand.c
+++ b/board/cssi/MCR3000/nand.c
@@ -5,6 +5,7 @@
  * Christophe Leroy <christophe.leroy at c-s.fr>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <nand.h>
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
index e22235a16da..45f2ebb8413 100644
--- a/board/d-link/dns325/dns325.c
+++ b/board/d-link/dns325/dns325.c
@@ -21,6 +21,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/arch/gpio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "dns325.h"
 
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 8cc118cde5a..cfb6d0ffdff 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -32,6 +32,7 @@
 #include <asm/gpio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_MMC_DAVINCI
 #include <mmc.h>
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 30182d02805..559ad93c9ef 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -31,6 +31,7 @@
 #endif
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/devboards/dbm-soc1/qts/pinmux_config.h b/board/devboards/dbm-soc1/qts/pinmux_config.h
index 3f34b131f33..90473c1828e 100644
--- a/board/devboards/dbm-soc1/qts/pinmux_config.h
+++ b/board/devboards/dbm-soc1/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/devboards/dbm-soc1/qts/sdram_config.h b/board/devboards/dbm-soc1/qts/sdram_config.h
index 2022969bed9..ba77e006161 100644
--- a/board/devboards/dbm-soc1/qts/sdram_config.h
+++ b/board/devboards/dbm-soc1/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 8e05de356a2..ab3a0867965 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index fdf915fead4..d289f0917cb 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
@@ -29,6 +29,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 17dfb85bfd9..366dcf578f1 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -7,6 +7,7 @@
 #include <adc.h>
 #include <log.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/stm32.h>
@@ -42,6 +43,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <remoteproc.h>
 #include <reset.h>
diff --git a/board/ebv/socrates/qts/pinmux_config.h b/board/ebv/socrates/qts/pinmux_config.h
index 41b634315bf..950b72aa617 100644
--- a/board/ebv/socrates/qts/pinmux_config.h
+++ b/board/ebv/socrates/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/ebv/socrates/qts/sdram_config.h b/board/ebv/socrates/qts/sdram_config.h
index 2f8465bf77c..1bf1e8708ea 100644
--- a/board/ebv/socrates/qts/sdram_config.h
+++ b/board/ebv/socrates/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index adbd0847c4b..c07722a686e 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -20,6 +20,7 @@
 #include <watchdog.h>
 #include <debug_uart.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/ofnode.h>
 #include <power/pmic.h>
diff --git a/board/eets/pdu001/board.h b/board/eets/pdu001/board.h
index bfea96e5f02..034a24ac67c 100644
--- a/board/eets/pdu001/board.h
+++ b/board/eets/pdu001/board.h
@@ -25,6 +25,7 @@
  * However we relay on the ROM to configure the pins of MMC0 (eMMC) as well
  * as MMC1 (microSD card-cage) since these are our boot devices.
  */
+#include <asm/types.h>
 void enable_uart0_pin_mux(void);
 void enable_uart1_pin_mux(void);
 void enable_uart2_pin_mux(void);
diff --git a/board/eets/pdu001/mux.c b/board/eets/pdu001/mux.c
index f0f9e262ebd..4466775c811 100644
--- a/board/eets/pdu001/mux.c
+++ b/board/eets/pdu001/mux.c
@@ -13,6 +13,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/mux.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include "board.h"
 
 static struct module_pin_mux uart0_pin_mux[] = {
diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c
index ad5285f8ca9..93a8f1c9a77 100644
--- a/board/egnite/ethernut5/ethernut5_pwrman.c
+++ b/board/egnite/ethernut5/ethernut5_pwrman.c
@@ -20,6 +20,7 @@
  * which allows to manually deal with the PMC.
  *
  * Two distinct registers are provided by the PMC for enabling
+#include <asm/types.h>
  * and disabling specific features. This avoids the often seen
  * read-modify-write cycle or shadow register requirement.
  * Additional registers are available to query the board
diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c
index 952ec9dae10..e5ff2dab705 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -35,6 +35,7 @@
 #include <input.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index b6d29adc5f4..e4ae166ea5b 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -43,6 +43,7 @@
 #include <ipu_pixfmt.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 820194fc887..9436aa9f886 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <virtio_types.h>
 #include <virtio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index 575367e1de7..4825b0fecbb 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -14,6 +14,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 int board_init(void)
 {
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index eab67c0aa95..d291f491a7c 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -18,6 +18,7 @@
 #include <asm/arch/sys_proto.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index 965123a82c0..6b5660513b9 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -14,6 +14,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/engicam/imx6q/imx6q.c b/board/engicam/imx6q/imx6q.c
index 3405c7a09e4..eb8322a7848 100644
--- a/board/engicam/imx6q/imx6q.c
+++ b/board/engicam/imx6q/imx6q.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 6ddaed412ed..9936733ee4d 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -31,6 +31,7 @@
 #include <netdev.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c
index 7ced22e8430..67538bf8a00 100644
--- a/board/esd/vme8349/caddy.c
+++ b/board/esd/vme8349/caddy.c
@@ -18,6 +18,7 @@
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "caddy.h"
 
diff --git a/board/esd/vme8349/caddy.h b/board/esd/vme8349/caddy.h
index 8e3033ba20e..3d0df1e1c0e 100644
--- a/board/esd/vme8349/caddy.h
+++ b/board/esd/vme8349/caddy.h
@@ -9,6 +9,7 @@
 #ifndef __CADDY_H__
 #define __CADDY_H__
 
+#include <linux/types.h>
 #define CMD_SIZE	1024
 #define ANSWER_SIZE	1024
 #define CADDY_MAGIC	"esd vme8349 V1.0"
diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c
index dea5e1690a2..e3b2464076e 100644
--- a/board/esd/vme8349/pci.c
+++ b/board/esd/vme8349/pci.c
@@ -19,6 +19,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include "vme8349pin.h"
 
diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c
index f7934b0f016..f107a22f1e0 100644
--- a/board/esd/vme8349/vme8349.c
+++ b/board/esd/vme8349/vme8349.c
@@ -32,6 +32,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/common/arm_sleep.c b/board/freescale/common/arm_sleep.c
index ddcab9f9eef..2e51b43de3c 100644
--- a/board/freescale/common/arm_sleep.c
+++ b/board/freescale/common/arm_sleep.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
@@ -14,6 +15,7 @@
 #include <asm/secure.h>
 #endif
 #include <asm/armv7.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_ARCH_LS1021A)
 #include <asm/arch/immap_ls102xa.h>
diff --git a/board/freescale/common/cadmus.c b/board/freescale/common/cadmus.c
index 7e7394f333e..2b5b62e5bc0 100644
--- a/board/freescale/common/cadmus.c
+++ b/board/freescale/common/cadmus.c
@@ -5,6 +5,7 @@
 
 
 #include <common.h>
+#include <linux/types.h>
 
 
 /*
diff --git a/board/freescale/common/cds_pci_ft.c b/board/freescale/common/cds_pci_ft.c
index 6b3690610d9..c5d673c2db9 100644
--- a/board/freescale/common/cds_pci_ft.c
+++ b/board/freescale/common/cds_pci_ft.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c
index 72b58360c27..1a77528a5ed 100644
--- a/board/freescale/common/cmd_esbc_validate.c
+++ b/board/freescale/common/cmd_esbc_validate.c
@@ -9,6 +9,7 @@
 #include <fsl_validate.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc,
 		 char *const argv[])
diff --git a/board/freescale/common/dcu_sii9022a.c b/board/freescale/common/dcu_sii9022a.c
index dc0f27bfe71..3170444c8f5 100644
--- a/board/freescale/common/dcu_sii9022a.c
+++ b/board/freescale/common/dcu_sii9022a.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <fsl_dcu_fb.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include <linux/fb.h>
 
 #define PIXEL_CLK_LSB_REG		0x00
diff --git a/board/freescale/common/diu_ch7301.c b/board/freescale/common/diu_ch7301.c
index cd6264b354f..8305a5c6af6 100644
--- a/board/freescale/common/diu_ch7301.c
+++ b/board/freescale/common/diu_ch7301.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <stdio_dev.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #define I2C_DVI_INPUT_DATA_FORMAT_REG		0x1F
diff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c
index b8f2bbd2b5a..82544d4f55a 100644
--- a/board/freescale/common/emc2305.c
+++ b/board/freescale/common/emc2305.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "emc2305.h"
 
diff --git a/board/freescale/common/emc2305.h b/board/freescale/common/emc2305.h
index eddf5371384..5608f72f510 100644
--- a/board/freescale/common/emc2305.h
+++ b/board/freescale/common/emc2305.h
@@ -8,6 +8,7 @@
 #ifndef __EMC2305_H_
 #define __EMC2305_H_
 
+#include <asm/types.h>
 #define I2C_EMC2305_CONF		0x20
 #define I2C_EMC2305_FAN1		0x30
 #define I2C_EMC2305_FAN2		0x40
diff --git a/board/freescale/common/fman.c b/board/freescale/common/fman.c
index 358303108d8..af45f3429a7 100644
--- a/board/freescale/common/fman.c
+++ b/board/freescale/common/fman.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/libfdt.h>
 #include <linux/libfdt_env.h>
 #include <fdt_support.h>
diff --git a/board/freescale/common/fman.h b/board/freescale/common/fman.h
index 16afc34b03e..976a09f1e14 100644
--- a/board/freescale/common/fman.h
+++ b/board/freescale/common/fman.h
@@ -6,6 +6,7 @@
 #ifndef __FMAN_BOARD_HELPER__
 #define __FMAN_BOARD_HELPER__
 
+#include <asm/types.h>
 int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t addr,
 			const char *alias);
 
diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c
index 7567ea2c1c2..dd8dcba4157 100644
--- a/board/freescale/common/fsl_chain_of_trust.c
+++ b/board/freescale/common/fsl_chain_of_trust.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <fsl_validate.h>
@@ -12,6 +13,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <dm/root.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FRAMEWORK)
 #include <spl.h>
diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index a228c82bc8e..7b962025c60 100644
--- a/board/freescale/common/fsl_validate.c
+++ b/board/freescale/common/fsl_validate.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <flash.h>
 #include <fsl_validate.h>
@@ -17,6 +18,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/rsa-mod-exp.h>
 #include <hash.h>
 #include <fsl_secboot_err.h>
diff --git a/board/freescale/common/ics307_clk.c b/board/freescale/common/ics307_clk.c
index 7a74239fb3a..2cd8adf24cb 100644
--- a/board/freescale/common/ics307_clk.c
+++ b/board/freescale/common/ics307_clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #include "ics307_clk.h"
diff --git a/board/freescale/common/idt8t49n222a_serdes_clk.h b/board/freescale/common/idt8t49n222a_serdes_clk.h
index b1528e32669..4e21403e914 100644
--- a/board/freescale/common/idt8t49n222a_serdes_clk.h
+++ b/board/freescale/common/idt8t49n222a_serdes_clk.h
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include "qixis.h"
 #include "../b4860qds/b4860qds_qixis.h"
 #include <errno.h>
diff --git a/board/freescale/common/ls102xa_stream_id.c b/board/freescale/common/ls102xa_stream_id.c
index a6ee87da9f5..f1f86e5cc29 100644
--- a/board/freescale/common/ls102xa_stream_id.c
+++ b/board/freescale/common/ls102xa_stream_id.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/ls102xa_stream_id.h>
+#include <linux/types.h>
 
 void ls102xa_config_smmu_stream_id(struct smmu_stream_id *id, uint32_t num)
 {
diff --git a/board/freescale/common/mc34vr500.c b/board/freescale/common/mc34vr500.c
index d96d1e2293f..12ad0057c23 100644
--- a/board/freescale/common/mc34vr500.c
+++ b/board/freescale/common/mc34vr500.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.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 bfaf8eb2d6f..f2daa50150b 100644
--- a/board/freescale/common/mpc85xx_sleep.c
+++ b/board/freescale/common/mpc85xx_sleep.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/immap_85xx.h>
+#include <asm/types.h>
 #include "sleep.h"
 #ifdef CONFIG_U_QE
 #include <fsl_qe.h>
diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c
index 6938c2c2ead..45d61caaae2 100644
--- a/board/freescale/common/ngpixis.c
+++ b/board/freescale/common/ngpixis.c
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include "ngpixis.h"
diff --git a/board/freescale/common/ngpixis.h b/board/freescale/common/ngpixis.h
index 7a20ee015fa..7342220bc04 100644
--- a/board/freescale/common/ngpixis.h
+++ b/board/freescale/common/ngpixis.h
@@ -10,6 +10,7 @@
 /* ngPIXIS register set. Hopefully, this won't change too much over time.
  * Feel free to add board-specific #ifdefs where necessary.
  */
+#include <asm/types.h>
 typedef struct ngpixis {
 	u8 id;
 	u8 arch;
diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c
index 64eeb1159e7..16fb8d44add 100644
--- a/board/freescale/common/ns_access.c
+++ b/board/freescale/common/ns_access.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ns_access.h>
 #include <asm/arch/fsl_serdes.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_ARCH_LS1021A
 static struct csu_ns_dev ns_dev[] = {
diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c
index 2011738fe21..95a21e1cb9b 100644
--- a/board/freescale/common/pfuze.c
+++ b/board/freescale/common/pfuze.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <errno.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
diff --git a/board/freescale/common/pfuze.h b/board/freescale/common/pfuze.h
index 45b49afaeb7..8cb94f8885c 100644
--- a/board/freescale/common/pfuze.h
+++ b/board/freescale/common/pfuze.h
@@ -14,4 +14,5 @@ struct pmic *pfuze_common_init(unsigned char i2cbus);
 int pfuze_mode_init(struct pmic *p, u32 mode);
 #endif
 
+#include <asm/types.h>
 #endif
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index 2d232958c5b..3dc5a3bf3ca 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #define pixis_base (u8 *)PIXIS_BASE
diff --git a/board/freescale/common/pixis.h b/board/freescale/common/pixis.h
index 40053c45bb7..78a2cd926e7 100644
--- a/board/freescale/common/pixis.h
+++ b/board/freescale/common/pixis.h
@@ -160,6 +160,7 @@ typedef struct pixis {
 #endif
 
 /* Pointer to the PIXIS register set */
+#include <asm/types.h>
 #define pixis ((pixis_t *)PIXIS_BASE)
 
 #endif	/* __PIXIS_H_ */
diff --git a/board/freescale/common/pq-mds-pib.c b/board/freescale/common/pq-mds-pib.c
index 10e1dfe43f9..8143f042c5b 100644
--- a/board/freescale/common/pq-mds-pib.c
+++ b/board/freescale/common/pq-mds-pib.c
@@ -12,6 +12,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "pq-mds-pib.h"
 
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c
index ee42a53dae1..07e1d0ef18e 100644
--- a/board/freescale/common/qixis.c
+++ b/board/freescale/common/qixis.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
@@ -16,6 +17,7 @@
 #include <linux/string.h>
 #include <linux/time.h>
 #include <i2c.h>
+#include <linux/types.h>
 #include "qixis.h"
 
 #ifndef QIXIS_LBMAP_BRDCFG_REG
diff --git a/board/freescale/common/qixis.h b/board/freescale/common/qixis.h
index 93638d24524..339980cbf01 100644
--- a/board/freescale/common/qixis.h
+++ b/board/freescale/common/qixis.h
@@ -10,6 +10,7 @@
 #ifndef __QIXIS_H_
 #define __QIXIS_H_
 
+#include <asm/types.h>
 struct qixis {
 	u8 id;      /* ID value uniquely identifying each QDS board type */
 	u8 arch;    /* Board version information */
diff --git a/board/freescale/common/sdhc_boot.c b/board/freescale/common/sdhc_boot.c
index a1c7a94a90e..903c6535097 100644
--- a/board/freescale/common/sdhc_boot.c
+++ b/board/freescale/common/sdhc_boot.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <mmc.h>
 #include <malloc.h>
+#include <asm/types.h>
 
 /*
  * The environment variables are written to just after the u-boot image
diff --git a/board/freescale/common/sgmii_riser.c b/board/freescale/common/sgmii_riser.c
index 5e486a98e84..2f689b7783e 100644
--- a/board/freescale/common/sgmii_riser.c
+++ b/board/freescale/common/sgmii_riser.c
@@ -21,6 +21,7 @@
 #include <tsec.h>
 #include <fdt_support.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 void fsl_sgmii_riser_init(struct tsec_info_struct *tsec_info, int num)
 {
diff --git a/board/freescale/common/spl.h b/board/freescale/common/spl.h
index d4689d3d726..b0e7abf76cb 100644
--- a/board/freescale/common/spl.h
+++ b/board/freescale/common/spl.h
@@ -6,6 +6,7 @@
 #ifndef __FREESCALE_BOARD_SPL_H
 #define __FREESCALE_BOARD_SPL_H
 
+#include <linux/types.h>
 void fsl_spi_spl_load_image(uint32_t offs, unsigned int size, void *vdst);
 void fsl_spi_boot(void) __noreturn;
 
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index f04bec05a41..3eeabf616d4 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -8,11 +8,13 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <i2c.h>
 #include <init.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index ebcb26b574c..3645a406fb8 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <i2c.h>
 #include <irq_func.h>
@@ -22,6 +23,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "vid.h"
 
 int __weak i2c_multiplexer_select_vid_channel(u8 channel)
diff --git a/board/freescale/common/vid.h b/board/freescale/common/vid.h
index 99778e9a934..a74f517c098 100644
--- a/board/freescale/common/vid.h
+++ b/board/freescale/common/vid.h
@@ -6,6 +6,7 @@
 #ifndef __VID_H_
 #define __VID_H_
 
+#include <linux/types.h>
 #define IR36021_LOOP1_MANUAL_ID_OFFSET	0x6A
 #define IR36021_LOOP1_VOUT_OFFSET	0x9A
 #define IR36021_MFR_ID_OFFSET		0x92
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index a6b93bab4e8..89dac9f46c8 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -12,6 +12,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 282346cd45c..10c26362305 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -17,6 +17,7 @@
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/corenet_ds/eth_hydra.c b/board/freescale/corenet_ds/eth_hydra.c
index f7c337d677a..e38c1d59dca 100644
--- a/board/freescale/corenet_ds/eth_hydra.c
+++ b/board/freescale/corenet_ds/eth_hydra.c
@@ -58,6 +58,7 @@
 #include <malloc.h>
 #include <fdt_support.h>
 #include <fsl_dtsec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index 30b7912c270..64066851c6b 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -26,6 +26,7 @@
 #include <phy.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.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 bda97fbd6bd..71b95e5cd72 100644
--- a/board/freescale/corenet_ds/eth_superhydra.c
+++ b/board/freescale/corenet_ds/eth_superhydra.c
@@ -59,6 +59,7 @@
 #include <malloc.h>
 #include <fdt_support.h>
 #include <fsl_dtsec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index a27d99820d0..227f92c4312 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 67523c404c6..f5c7ecfb9a6 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -24,6 +24,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index 61988cb6ea1..9014d652d1e 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -22,6 +22,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 
 #include <power/pca9450.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index ccb8f44f115..929470cf285 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -29,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <spl.h>
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index 3aa6c2d7a23..fac21ec5af3 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
@@ -22,6 +23,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index b46ddffda06..ecd48c6f824 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -20,6 +20,7 @@
 #include <dm/lists.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index f0220b13100..5e0bb68402f 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 <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
@@ -25,6 +26,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index 1cc32eade56..a87e8946943 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -26,6 +26,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 81695fc27d0..00a5425390a 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index 1b56414c020..1c59b34b1d0 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index 3100aee2715..6fb630ab64c 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -25,6 +25,7 @@
 #include <netdev.h>
 #include <fsl_sec.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/ls1012aqds/eth.c b/board/freescale/ls1012aqds/eth.c
index 35d7bfcb2ff..a0b44735dd8 100644
--- a/board/freescale/ls1012aqds/eth.c
+++ b/board/freescale/ls1012aqds/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <vsprintf.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 50e04204c68..4bb80717636 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <fdt_support.h>
 #include <stdio.h>
@@ -32,6 +33,7 @@
 #include <fsl_sec.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/qixis.h"
 #include "ls1012aqds_qixis.h"
 #include "ls1012aqds_pfe.h"
diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c
index 7d4d4017e92..d208686ffc8 100644
--- a/board/freescale/ls1012ardb/eth.c
+++ b/board/freescale/ls1012ardb/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <net.h>
 #include <stdio.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 8cc986ab01a..7c38a8b8ccf 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -33,6 +33,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index 66c701e1e35..988b0bad937 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/ls102xa_soc.h>
diff --git a/board/freescale/ls1021aqds/dcu.c b/board/freescale/ls1021aqds/dcu.c
index 7f0ae42e92b..175ce7ce5ba 100644
--- a/board/freescale/ls1021aqds/dcu.c
+++ b/board/freescale/ls1021aqds/dcu.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <fsl_dcu_fb.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include "div64.h"
 #include "../common/diu_ch7301.h"
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index 232449b1b50..677ad39394b 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <init.h>
@@ -16,6 +17,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1021aqds/ddr.h b/board/freescale/ls1021aqds/ddr.h
index 58a88384367..b7233dd7a2a 100644
--- a/board/freescale/ls1021aqds/ddr.h
+++ b/board/freescale/ls1021aqds/ddr.h
@@ -6,6 +6,7 @@
 #ifndef __DDR_H__
 #define __DDR_H__
 
+#include <asm/types.h>
 void erratum_a008850_post(void);
 
 struct board_specific_parameters {
diff --git a/board/freescale/ls1021aqds/eth.c b/board/freescale/ls1021aqds/eth.c
index 786935b8b33..bda159bfb7b 100644
--- a/board/freescale/ls1021aqds/eth.c
+++ b/board/freescale/ls1021aqds/eth.c
@@ -21,6 +21,7 @@
 #include <fsl_mdio.h>
 #include <tsec.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index c13ec412700..21c82e4ce53 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
@@ -29,6 +30,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/sleep.h"
 #include "../common/qixis.h"
 #include "ls1021aqds_qixis.h"
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 4ad4f1eb07a..72228133e9b 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 8c21393a6e5..38eebc268a6 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <compiler.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
@@ -34,6 +35,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/sleep.h"
 #ifdef CONFIG_U_QE
 #include <fsl_qe.h>
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index 220d0b0befa..bb60b980add 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <init.h>
 #include <malloc.h>
@@ -27,6 +28,7 @@
 #endif
 #include <fsl_immap.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 #include <fdtdec.h>
 #include <miiphy.h>
diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index 234403ed12a..20980bd5c14 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clock.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1043aqds/ddr.h b/board/freescale/ls1043aqds/ddr.h
index 65b0250d370..4e5f0b42611 100644
--- a/board/freescale/ls1043aqds/ddr.h
+++ b/board/freescale/ls1043aqds/ddr.h
@@ -6,6 +6,7 @@
 #ifndef __DDR_H__
 #define __DDR_H__
 
+#include <asm/types.h>
 extern void erratum_a008850_post(void);
 
 struct board_specific_parameters {
diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c
index ba56512ec96..0355a6aa89f 100644
--- a/board/freescale/ls1043aqds/eth.c
+++ b/board/freescale/ls1043aqds/eth.c
@@ -14,6 +14,7 @@
 #include <fm_eth.h>
 #include <fsl_mdio.h>
 #include <fsl_dtsec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index 6b377d0d997..8db0d0e510c 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
@@ -30,6 +31,7 @@
 #include <fsl_esdhc.h>
 #include <fsl_ifc.h>
 #include <spl.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "../common/qixis.h"
diff --git a/board/freescale/ls1043ardb/cpld.c b/board/freescale/ls1043ardb/cpld.c
index c230dcdca5d..52ab566f056 100644
--- a/board/freescale/ls1043ardb/cpld.c
+++ b/board/freescale/ls1043ardb/cpld.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include "cpld.h"
 
diff --git a/board/freescale/ls1043ardb/cpld.h b/board/freescale/ls1043ardb/cpld.h
index 2e757b557f4..dce9682e42b 100644
--- a/board/freescale/ls1043ardb/cpld.h
+++ b/board/freescale/ls1043ardb/cpld.h
@@ -9,6 +9,7 @@
 /*
  * CPLD register set of LS1043ARDB board-specific.
  */
+#include <asm/types.h>
 struct cpld_data {
 	u8 cpld_ver;		/* 0x0 - CPLD Major Revision Register */
 	u8 cpld_ver_sub;	/* 0x1 - CPLD Minor Revision Register */
diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c
index 1ffde4b246b..c3ab9d04217 100644
--- a/board/freescale/ls1043ardb/ddr.c
+++ b/board/freescale/ls1043ardb/ddr.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ddr.h"
 #include <log.h>
 #include <vsprintf.h>
diff --git a/board/freescale/ls1043ardb/ddr.h b/board/freescale/ls1043ardb/ddr.h
index 85ed920ca6d..373ce08afac 100644
--- a/board/freescale/ls1043ardb/ddr.h
+++ b/board/freescale/ls1043ardb/ddr.h
@@ -6,6 +6,7 @@
 #ifndef __DDR_H__
 #define __DDR_H__
 
+#include <asm/types.h>
 extern void erratum_a008850_post(void);
 
 struct board_specific_parameters {
diff --git a/board/freescale/ls1043ardb/eth.c b/board/freescale/ls1043ardb/eth.c
index a89978bbd7d..8e1e6f46c3b 100644
--- a/board/freescale/ls1043ardb/eth.c
+++ b/board/freescale/ls1043ardb/eth.c
@@ -11,6 +11,7 @@
 #include <fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "../common/fman.h"
diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c
index 86309266a04..1e38cdee765 100644
--- a/board/freescale/ls1043ardb/ls1043ardb.c
+++ b/board/freescale/ls1043ardb/ls1043ardb.c
@@ -22,6 +22,7 @@
 #include <fsl_esdhc.h>
 #include <fsl_ifc.h>
 #include <fsl_sec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "cpld.h"
 #ifdef CONFIG_U_QE
diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c
index 278856f56d7..eb869a1d4ad 100644
--- a/board/freescale/ls1046afrwy/eth.c
+++ b/board/freescale/ls1046afrwy/eth.c
@@ -12,6 +12,7 @@
 #include <fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
index 550c901a76b..34b601bc64e 100644
--- a/board/freescale/ls1046afrwy/ls1046afrwy.c
+++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
@@ -24,6 +24,7 @@
 #include <fsl_sec.h>
 #include <fsl_dspi.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define LS1046A_PORSR1_REG 0x1EE0000
 #define BOOT_SRC_SD        0x20000000
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index a182861ce65..3bba578b1a6 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clock.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1046aqds/ddr.h b/board/freescale/ls1046aqds/ddr.h
index e55446f2b29..de38f96c1a9 100644
--- a/board/freescale/ls1046aqds/ddr.h
+++ b/board/freescale/ls1046aqds/ddr.h
@@ -6,6 +6,7 @@
 #ifndef __DDR_H__
 #define __DDR_H__
 
+#include <asm/types.h>
 void erratum_a008850_post(void);
 
 struct board_specific_parameters {
diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c
index 1977b08eca2..7293d5eadeb 100644
--- a/board/freescale/ls1046aqds/eth.c
+++ b/board/freescale/ls1046aqds/eth.c
@@ -17,6 +17,7 @@
 #include <fsl_dtsec.h>
 #include <malloc.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "../common/qixis.h"
diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
index 1d06c3038a6..facc92ff437 100644
--- a/board/freescale/ls1046aqds/ls1046aqds.c
+++ b/board/freescale/ls1046aqds/ls1046aqds.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
@@ -31,6 +32,7 @@
 #include <fsl_ifc.h>
 #include <fsl_sec.h>
 #include <spl.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "../common/vid.h"
diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c
index 1f6fcc116e5..7f84bc06fbc 100644
--- a/board/freescale/ls1046ardb/cpld.c
+++ b/board/freescale/ls1046ardb/cpld.c
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include "cpld.h"
 
diff --git a/board/freescale/ls1046ardb/cpld.h b/board/freescale/ls1046ardb/cpld.h
index 765962c89ae..7d2509e8cbe 100644
--- a/board/freescale/ls1046ardb/cpld.h
+++ b/board/freescale/ls1046ardb/cpld.h
@@ -11,6 +11,7 @@
  * CPLD Revision:  V2.1
  */
 #include <stdbool.h>
+#include <asm/types.h>
 struct cpld_data {
 	u8 cpld_ver;		/* 0x0 - CPLD Major Revision Register */
 	u8 cpld_ver_sub;	/* 0x1 - CPLD Minor Revision Register */
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index 3b4129701b0..ca45bd91029 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -10,6 +10,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
diff --git a/board/freescale/ls1046ardb/ddr.h b/board/freescale/ls1046ardb/ddr.h
index 05baef232ab..47f5bb0c380 100644
--- a/board/freescale/ls1046ardb/ddr.h
+++ b/board/freescale/ls1046ardb/ddr.h
@@ -6,6 +6,7 @@
 #ifndef __DDR_H__
 #define __DDR_H__
 
+#include <asm/types.h>
 void erratum_a008850_post(void);
 
 struct board_specific_parameters {
diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c
index 6d05c964bd0..4f1cc233c0f 100644
--- a/board/freescale/ls1046ardb/eth.c
+++ b/board/freescale/ls1046ardb/eth.c
@@ -12,6 +12,7 @@
 #include <fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index d2f88ea9d06..69d1edfa61e 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -23,6 +23,7 @@
 #include <fm_eth.h>
 #include <fsl_csu.h>
 #include <fsl_esdhc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <power/mc34vr500_pmic.h>
 #include "cpld.h"
diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c
index bd8c0511e83..d85888d4858 100644
--- a/board/freescale/ls1088a/ddr.c
+++ b/board/freescale/ls1088a/ddr.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1088a/ddr.h b/board/freescale/ls1088a/ddr.h
index b35c4ae2dad..5c50bbf9439 100644
--- a/board/freescale/ls1088a/ddr.h
+++ b/board/freescale/ls1088a/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __LS1088A_DDR_H__
 #define __LS1088A_DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index fe0a890bb0c..52a7d65f65b 100644
--- a/board/freescale/ls1088a/eth_ls1088aqds.c
+++ b/board/freescale/ls1088a/eth_ls1088aqds.c
@@ -5,10 +5,12 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <net.h>
 #include <netdev.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -26,6 +28,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c
index 6898dfc6f39..349a092e177 100644
--- a/board/freescale/ls1088a/eth_ls1088ardb.c
+++ b/board/freescale/ls1088a/eth_ls1088ardb.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index b35266de231..852748ce32d 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -3,6 +3,7 @@
  * Copyright 2017-2018 NXP
  */
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <env.h>
 #include <i2c.h>
@@ -14,6 +15,7 @@
 #include <fsl_ifc.h>
 #include <fsl_ddr.h>
 #include <fsl_sec.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -31,6 +33,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/qixis.h"
 #include "ls1088a_qixis.h"
diff --git a/board/freescale/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
index 5a28549d190..c1b5c3532ec 100644
--- a/board/freescale/ls2080a/ddr.c
+++ b/board/freescale/ls2080a/ddr.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080a/ddr.h b/board/freescale/ls2080a/ddr.h
index d21b9265586..6152099c49d 100644
--- a/board/freescale/ls2080a/ddr.h
+++ b/board/freescale/ls2080a/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
index b2fb47eaaa5..44e925ee446 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -20,6 +20,7 @@
 #include <fsl-mc/fsl_mc.h>
 #include <env_internal.h>
 #include <asm/arch/soc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index 81003a98857..5a0c711e2cb 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080aqds/ddr.h b/board/freescale/ls2080aqds/ddr.h
index b5d790a4a05..a65f7e07183 100644
--- a/board/freescale/ls2080aqds/ddr.h
+++ b/board/freescale/ls2080aqds/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index 167bd1475c9..a7a2eaaf4b0 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <net.h>
 #include <netdev.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -24,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 8a44ea36003..63addf576d6 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -3,6 +3,7 @@
  * Copyright 2015 Freescale Semiconductor
  */
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <env.h>
 #include <init.h>
@@ -28,6 +29,7 @@
 #include <asm/arch/ppa.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 
 #include "../common/qixis.h"
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index d1f36840aa1..3b9f83f482c 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080ardb/ddr.h b/board/freescale/ls2080ardb/ddr.h
index c5f2a95211b..584821d6b8d 100644
--- a/board/freescale/ls2080ardb/ddr.h
+++ b/board/freescale/ls2080ardb/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c b/board/freescale/ls2080ardb/eth_ls2080rdb.c
index b4f718b1ae6..6624c3d6374 100644
--- a/board/freescale/ls2080ardb/eth_ls2080rdb.c
+++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index a69f207c213..c4a5a8902ce 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -4,6 +4,7 @@
  * Copyright 2017 NXP
  */
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <env.h>
 #include <init.h>
@@ -29,6 +30,7 @@
 #include <asm/arch/ppa.h>
 #include <fsl_sec.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_FSL_QIXIS
 #include "../common/qixis.h"
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index 74b31f9a877..1901366fc4f 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <fm_eth.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -29,6 +30,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index 6c25108c8e3..96d99291033 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 55a7e9b6f0b..d6bd5b715f3 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <dm.h>
 #include <init.h>
@@ -34,6 +35,7 @@
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/qixis.h"
 #include "../common/vid.h"
 #include <fsl_immap.h>
diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c
index 594728a2dd6..4a2d4b347c2 100644
--- a/board/freescale/m5208evbe/m5208evbe.c
+++ b/board/freescale/m5208evbe/m5208evbe.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c
index 1ecdfb39312..c366205fd99 100644
--- a/board/freescale/m52277evb/m52277evb.c
+++ b/board/freescale/m52277evb/m52277evb.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c
index 6050d5c621d..a9995a88535 100644
--- a/board/freescale/m5235evb/m5235evb.c
+++ b/board/freescale/m5235evb/m5235evb.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c
index 9cb08d85cc7..a02aceb2066 100644
--- a/board/freescale/m5249evb/m5249evb.c
+++ b/board/freescale/m5249evb/m5249evb.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 025e9dbcf52..2bc65a4313d 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -13,6 +13,7 @@
 #include <irq_func.h>
 #include <stdio.h>
 #include <time.h>
+#include <linux/types.h>
 
 #include <asm/immap.h>
 
diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c
index 90c79a60f83..c834170c3f1 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -15,6 +15,7 @@
 #include <asm/immap.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c
index e1ea9b3a58f..e7ed2a46f2e 100644
--- a/board/freescale/m5282evb/m5282evb.c
+++ b/board/freescale/m5282evb/m5282evb.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/global_data.h>
 #include <asm/immap.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c
index e1c5dca7004..f7cebcbbc72 100644
--- a/board/freescale/m53017evb/m53017evb.c
+++ b/board/freescale/m53017evb/m53017evb.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c
index ccbcbeb342e..55d21de1b97 100644
--- a/board/freescale/m5329evb/m5329evb.c
+++ b/board/freescale/m5329evb/m5329evb.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5329evb/nand.c b/board/freescale/m5329evb/nand.c
index 58b8ee51d37..ad004fbc25b 100644
--- a/board/freescale/m5329evb/nand.c
+++ b/board/freescale/m5329evb/nand.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/immap.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <nand.h>
diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c
index bd65509ac60..dc0f24d3567 100644
--- a/board/freescale/m5373evb/m5373evb.c
+++ b/board/freescale/m5373evb/m5373evb.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5373evb/nand.c b/board/freescale/m5373evb/nand.c
index 4c30d510018..b706cbc5c75 100644
--- a/board/freescale/m5373evb/nand.c
+++ b/board/freescale/m5373evb/nand.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/immap.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <nand.h>
diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c
index b931b869326..ee695091ce6 100644
--- a/board/freescale/m54418twr/m54418twr.c
+++ b/board/freescale/m54418twr/m54418twr.c
@@ -13,6 +13,7 @@
 #include <asm/immap.h>
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c
index deaf62530a1..84c1f01bca0 100644
--- a/board/freescale/m54451evb/m54451evb.c
+++ b/board/freescale/m54451evb/m54451evb.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c
index 64ff296ad80..045fbac3cac 100644
--- a/board/freescale/m54455evb/m54455evb.c
+++ b/board/freescale/m54455evb/m54455evb.c
@@ -15,6 +15,7 @@
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c
index 255a42baeee..cb9bb1636a4 100644
--- a/board/freescale/m547xevb/m547xevb.c
+++ b/board/freescale/m547xevb/m547xevb.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c
index 9228ccbb06f..cb049269de4 100644
--- a/board/freescale/m548xevb/m548xevb.c
+++ b/board/freescale/m548xevb/m548xevb.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c
index 08507351d2f..b0e650c3dc1 100644
--- a/board/freescale/mpc8308rdb/mpc8308rdb.c
+++ b/board/freescale/mpc8308rdb/mpc8308rdb.c
@@ -11,6 +11,7 @@
 #include <net.h>
 #include <spi.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/board/freescale/mpc8308rdb/sdram.c b/board/freescale/mpc8308rdb/sdram.c
index 10605ae79a7..32b948fee23 100644
--- a/board/freescale/mpc8308rdb/sdram.c
+++ b/board/freescale/mpc8308rdb/sdram.c
@@ -15,6 +15,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #include <asm/bitops.h>
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c
index 36297b81a3a..fba8054f850 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -23,6 +23,7 @@
 #endif
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
index 5c69e201afd..d0f1cbdcfe4 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -13,6 +13,7 @@
 #include <spd_sdram.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index a4e769934aa..86419c399aa 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -23,6 +23,7 @@
 #include <asm/io.h>
 #include <ns16550.h>
 #include <nand.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
index 84abf2c3501..63c3cac0820 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -13,6 +13,7 @@
 #include <spd_sdram.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c
index e2f56ae31d6..a18d8783ed9 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -27,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #if defined(CONFIG_PCI)
 #include <pci.h>
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index 92fd0336a76..f183a450d23 100644
--- a/board/freescale/mpc832xemds/mpc832xemds.c
+++ b/board/freescale/mpc832xemds/mpc832xemds.c
@@ -25,6 +25,7 @@
 #if defined(CONFIG_PQ_MDS_PIB)
 #include "../common/pq-mds-pib.h"
 #endif
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mpc8349emds/ddr.c b/board/freescale/mpc8349emds/ddr.c
index f4dfea8315f..52d2b8f55fe 100644
--- a/board/freescale/mpc8349emds/ddr.c
+++ b/board/freescale/mpc8349emds/ddr.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index b864a1cd4f6..35375842dc0 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -24,6 +24,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 254ed2a79d1..271942ccecd 100644
--- a/board/freescale/mpc8349emds/pci.c
+++ b/board/freescale/mpc8349emds/pci.c
@@ -12,6 +12,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <asm/types.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 aa97625c0f5..7d73d8a2c44 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -28,6 +28,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 a09b6586882..0924e7c13e7 100644
--- a/board/freescale/mpc8349itx/pci.c
+++ b/board/freescale/mpc8349itx/pci.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 49eb2874d86..ee17a3b5aa8 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
@@ -16,6 +17,7 @@
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
 #include <tsec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c
index 06cb3a6553b..dacdb8bb04b 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 <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 5f3f747ee9a..0c0a6016ddd 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <hwconfig.h>
 #include <i2c.h>
@@ -22,6 +23,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc837xerdb/pci.c b/board/freescale/mpc837xerdb/pci.c
index dccf8c5551b..7306957f50f 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 <asm/types.h>
 #include <linux/delay.h>
 
 static struct pci_region pci_regions[] = {
diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c
index ed71fa4d384..01ecadbae37 100644
--- a/board/freescale/mpc8541cds/mpc8541cds.c
+++ b/board/freescale/mpc8541cds/mpc8541cds.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 #include "../common/cadmus.h"
 #include "../common/eeprom.h"
diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c
index a495e081800..eccf7c198d4 100644
--- a/board/freescale/mpc8544ds/mpc8544ds.c
+++ b/board/freescale/mpc8544ds/mpc8544ds.c
@@ -23,6 +23,7 @@
 #include <fsl_mdio.h>
 #include <tsec.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 #include "../common/sgmii_riser.h"
 
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c
index 08ac02b4923..03e6b25e79f 100644
--- a/board/freescale/mpc8548cds/mpc8548cds.c
+++ b/board/freescale/mpc8548cds/mpc8548cds.c
@@ -26,6 +26,7 @@
 #include <tsec.h>
 #include <fsl_mdio.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 #include "../common/cadmus.h"
 #include "../common/eeprom.h"
diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c
index e3c96ae162f..d170c04a433 100644
--- a/board/freescale/mpc8555cds/mpc8555cds.c
+++ b/board/freescale/mpc8555cds/mpc8555cds.c
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 #include "../common/cadmus.h"
 #include "../common/eeprom.h"
diff --git a/board/freescale/mpc8568mds/bcsr.c b/board/freescale/mpc8568mds/bcsr.c
index b1e638af5ae..cbdccebb570 100644
--- a/board/freescale/mpc8568mds/bcsr.c
+++ b/board/freescale/mpc8568mds/bcsr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <flash.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include "bcsr.h"
 
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index 8ea51e1f236..74530c2e55f 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 #include "bcsr.h"
 
diff --git a/board/freescale/mpc8569mds/bcsr.c b/board/freescale/mpc8569mds/bcsr.c
index 9ed00f6e5b1..0e373244ad0 100644
--- a/board/freescale/mpc8569mds/bcsr.c
+++ b/board/freescale/mpc8569mds/bcsr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <flash.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "bcsr.h"
 
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index 012fd54c3fe..fd1f0e1a72f 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <console.h>
 #include <flash.h>
 #include <hwconfig.h>
@@ -31,6 +32,7 @@
 #include <fsl_esdhc.h>
 #include <phy.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "bcsr.h"
 #if defined(CONFIG_PQ_MDS_PIB)
diff --git a/board/freescale/mpc8572ds/ddr.c b/board/freescale/mpc8572ds/ddr.c
index 0c4b7d7d621..ee8d806f51c 100644
--- a/board/freescale/mpc8572ds/ddr.c
+++ b/board/freescale/mpc8572ds/ddr.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index c62862f1db0..da93076dd0f 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <image.h>
 #include <init.h>
@@ -28,6 +29,7 @@
 #include <tsec.h>
 #include <fsl_mdio.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 #include "../common/sgmii_riser.h"
 
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index d696e23bc53..687189e4005 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <init.h>
 #include <log.h>
 #include <net.h>
@@ -24,6 +25,7 @@
 #include <fdt_support.h>
 #include <spd_sdram.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index cabb8bab335..e6c3058d784 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <fsl_diu_fb.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 #include "../common/pixis.h"
diff --git a/board/freescale/mpc8641hpcn/ddr.c b/board/freescale/mpc8641hpcn/ddr.c
index 8ccac70a30b..66f6ed6c304 100644
--- a/board/freescale/mpc8641hpcn/ddr.c
+++ b/board/freescale/mpc8641hpcn/ddr.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 209c354dda4..450ec18bf20 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <log.h>
 #include <net.h>
@@ -21,6 +22,7 @@
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c
index b7c67cc6883..c640fed717d 100644
--- a/board/freescale/mx23evk/spl_boot.c
+++ b/board/freescale/mx23evk/spl_boot.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_SSP1	(MXS_PAD_8MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c
index 9a3f88abd36..876325e2792 100644
--- a/board/freescale/mx28evk/iomux.c
+++ b/board/freescale/mx28evk/iomux.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_GPMI	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index d096948d4d3..aa45e3c7438 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx51.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 325f1763976..1460be1fbfe 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -14,6 +14,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <netdev.h>
diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c
index 1e43ea9cece..36c7d1e86ee 100644
--- a/board/freescale/mx53evk/mx53evk.c
+++ b/board/freescale/mx53evk/mx53evk.c
@@ -13,6 +13,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 02c6f76d3ab..7c5196a2139 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -17,6 +17,7 @@
 #include <asm/arch/iomux-mx53.h>
 #include <asm/arch/clock.h>
 #include <env.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/mach-imx/mx5_video.h>
diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c
index 24807f62916..feafcd2c181 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -13,6 +13,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <netdev.h>
diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c
index b7dd87abacb..c4b1ff7e6c3 100644
--- a/board/freescale/mx6memcal/spl.c
+++ b/board/freescale/mx6memcal/spl.c
@@ -19,6 +19,7 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index d2f659d5732..212d3eda9dc 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/clock.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index 2944220a936..1598f802125 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -36,6 +36,7 @@
 #include <pca953x.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 6f85ba27724..532be2c8e46 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -34,6 +34,7 @@
 #include <input.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index da48f7cd674..35f45309a50 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -29,6 +29,7 @@
 #include <i2c.h>
 #include <mmc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c
index 9a696e79929..6a0f7955ecb 100644
--- a/board/freescale/mx6sllevk/mx6sllevk.c
+++ b/board/freescale/mx6sllevk/mx6sllevk.c
@@ -17,6 +17,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/io.h>
 #include <common.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index 3e0e733bde3..5e2347a9848 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -19,6 +19,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 965a3808e73..6423a813ea9 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -7,6 +7,7 @@
 
 #include <init.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 044d1e97457..751f2aff877 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -32,6 +32,7 @@
 #include <mmc.h>
 #include <netdev.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include "../common/pfuze.h"
diff --git a/board/freescale/p1010rdb/ddr.c b/board/freescale/p1010rdb/ddr.c
index 38c274275bf..cb26005bc43 100644
--- a/board/freescale/p1010rdb/ddr.c
+++ b/board/freescale/p1010rdb/ddr.c
@@ -16,6 +16,7 @@
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index a57b564f5ef..397155a9330 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <image.h>
 #include <init.h>
 #include <net.h>
@@ -32,6 +33,7 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index a11ec6b0c98..6bfa092f5f3 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -19,6 +19,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/p1010rdb/spl_minimal.c b/board/freescale/p1010rdb/spl_minimal.c
index 4d72665dbb7..aaf58e11ff3 100644
--- a/board/freescale/p1010rdb/spl_minimal.c
+++ b/board/freescale/p1010rdb/spl_minimal.c
@@ -14,6 +14,7 @@
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_law.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index e7862d18498..8479487b8ae 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -34,6 +34,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <fsl_dtsec.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p1_p2_rdb_pc/ddr.c b/board/freescale/p1_p2_rdb_pc/ddr.c
index 90ce75a70e3..fa16cbfc1d6 100644
--- a/board/freescale/p1_p2_rdb_pc/ddr.c
+++ b/board/freescale/p1_p2_rdb_pc/ddr.c
@@ -15,6 +15,7 @@
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_DDR_RAW_TIMING
 #if	defined(CONFIG_P1020RDB_PROTO) || \
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 7fec510c8ca..9a9cefed14e 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
@@ -27,6 +27,7 @@
 #include <asm/fsl_lbc.h>
 #include <asm/mp.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index f69f7fced31..fef2910f4b5 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -20,6 +20,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/p1_p2_rdb_pc/spl_minimal.c b/board/freescale/p1_p2_rdb_pc/spl_minimal.c
index 3079e21d1c1..7f1fbf7a03a 100644
--- a/board/freescale/p1_p2_rdb_pc/spl_minimal.c
+++ b/board/freescale/p1_p2_rdb_pc/spl_minimal.c
@@ -13,6 +13,7 @@
 #include <asm/fsl_law.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c
index 4e1254dd134..c668fce0233 100644
--- a/board/freescale/p2041rdb/cpld.c
+++ b/board/freescale/p2041rdb/cpld.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include "cpld.h"
diff --git a/board/freescale/p2041rdb/cpld.h b/board/freescale/p2041rdb/cpld.h
index 8c90c1ccf32..b4733fd64f5 100644
--- a/board/freescale/p2041rdb/cpld.h
+++ b/board/freescale/p2041rdb/cpld.h
@@ -10,6 +10,7 @@
 /*
  * CPLD register set. Feel free to add board-specific #ifdefs where necessary.
  */
+#include <asm/types.h>
 typedef struct cpld_data {
 	u8 cpld_ver;		/* 0x0 - CPLD Major Revision Register */
 	u8 cpld_ver_sub;	/* 0x1 - CPLD Minor Revision Register */
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index 83dccf90370..a3311abb93e 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -17,6 +17,7 @@
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/p2041rdb/eth.c b/board/freescale/p2041rdb/eth.c
index 94b05020050..ce855e8c277 100644
--- a/board/freescale/p2041rdb/eth.c
+++ b/board/freescale/p2041rdb/eth.c
@@ -22,6 +22,7 @@
 #include <fsl_mdio.h>
 #include <malloc.h>
 #include <fsl_dtsec.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "cpld.h"
diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c
index ca2a8eb9597..afeffb8b66a 100644
--- a/board/freescale/p2041rdb/p2041rdb.c
+++ b/board/freescale/p2041rdb/p2041rdb.c
@@ -12,6 +12,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 5c84b404e0e..a98bce8773c 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -28,6 +28,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/s32v234evb/clock.c b/board/freescale/s32v234evb/clock.c
index 21c619fa1ad..49159b293b6 100644
--- a/board/freescale/s32v234evb/clock.c
+++ b/board/freescale/s32v234evb/clock.c
@@ -8,6 +8,7 @@
 #include <asm/arch/mc_cgm_regs.h>
 #include <asm/arch/mc_me_regs.h>
 #include <asm/arch/clock.h>
+#include <linux/types.h>
 
 /*
  * Select the clock reference for required pll.
diff --git a/board/freescale/s32v234evb/lpddr2.c b/board/freescale/s32v234evb/lpddr2.c
index b3775d3763e..d41bc10bd15 100644
--- a/board/freescale/s32v234evb/lpddr2.c
+++ b/board/freescale/s32v234evb/lpddr2.c
@@ -8,6 +8,7 @@
 #include <asm/arch/siul.h>
 #include <asm/arch/lpddr2.h>
 #include <asm/arch/mmdc.h>
+#include <linux/types.h>
 
 volatile int mscr_offset_ck0;
 
diff --git a/board/freescale/t102xrdb/cpld.c b/board/freescale/t102xrdb/cpld.c
index 601afbc336d..1b794fbffce 100644
--- a/board/freescale/t102xrdb/cpld.c
+++ b/board/freescale/t102xrdb/cpld.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include "cpld.h"
 
diff --git a/board/freescale/t102xrdb/cpld.h b/board/freescale/t102xrdb/cpld.h
index c05f536806f..969c20ed1d1 100644
--- a/board/freescale/t102xrdb/cpld.h
+++ b/board/freescale/t102xrdb/cpld.h
@@ -4,6 +4,7 @@
  *
  */
 
+#include <asm/types.h>
 struct cpld_data {
 	u8 cpld_ver;		/* 0x00 - CPLD Major Revision Register */
 	u8 cpld_ver_sub;	/* 0x01 - CPLD Minor Revision Register */
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index 856619af2f0..ef98e4ea8b6 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
@@ -19,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index 95d49e26f44..a7dd0182aca 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -25,6 +25,7 @@
 #include <phy.h>
 #include <fsl_dtsec.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "../common/fman.h"
 
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index 1d8da111668..1bb7f4f7eee 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -4,6 +4,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
@@ -18,6 +19,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/sleep.h"
 #include "../common/spl.h"
 
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index cdecfb08706..f570973609c 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
@@ -14,6 +15,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t102xrdb/t102xrdb.h b/board/freescale/t102xrdb/t102xrdb.h
index a567ae18dab..b81eebbbc1f 100644
--- a/board/freescale/t102xrdb/t102xrdb.h
+++ b/board/freescale/t102xrdb/t102xrdb.h
@@ -6,6 +6,7 @@
 #ifndef __T1024_RDB_H__
 #define __T1024_RDB_H__
 
+#include <asm/types.h>
 #include <asm/u-boot.h>
 void fdt_fixup_board_enet(void *blob);
 void pci_of_setup(void *blob, struct bd_info *bd);
diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c
index c2dfb17a1cf..0a8e1a64e3b 100644
--- a/board/freescale/t104xrdb/cpld.c
+++ b/board/freescale/t104xrdb/cpld.c
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include "cpld.h"
diff --git a/board/freescale/t104xrdb/cpld.h b/board/freescale/t104xrdb/cpld.h
index a816aef10a4..70015ebc481 100644
--- a/board/freescale/t104xrdb/cpld.h
+++ b/board/freescale/t104xrdb/cpld.h
@@ -9,6 +9,7 @@
 /*
  * CPLD register set. Feel free to add board-specific #ifdefs where necessary.
  */
+#include <asm/types.h>
 struct cpld_data {
 	u8 cpld_ver;		/* 0x00 - CPLD Major Revision Register */
 	u8 cpld_ver_sub;	/* 0x01 - CPLD Minor Revision Register */
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index 55493e4bb14..6c68604de0f 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
@@ -18,6 +19,7 @@
 #include <asm/mpc85xx_gpio.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t104xrdb/ddr.h b/board/freescale/t104xrdb/ddr.h
index f9d667f6174..496fe3a8b12 100644
--- a/board/freescale/t104xrdb/ddr.h
+++ b/board/freescale/t104xrdb/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/t104xrdb/diu.c b/board/freescale/t104xrdb/diu.c
index fe5a1de57d9..43d82619b0c 100644
--- a/board/freescale/t104xrdb/diu.c
+++ b/board/freescale/t104xrdb/diu.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <fsl_diu_fb.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <video_fb.h>
diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c
index 4a3f02d10fc..e1a348ed9bd 100644
--- a/board/freescale/t104xrdb/spl.c
+++ b/board/freescale/t104xrdb/spl.c
@@ -18,6 +18,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/sleep.h"
 #include "../common/spl.h"
 
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index 292c31246c4..9360fdc4d1d 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <fdt_support.h>
 #include <hwconfig.h>
@@ -14,6 +15,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c
index 49a9b75a4fb..0d7ad4e9db7 100644
--- a/board/freescale/t208xqds/ddr.c
+++ b/board/freescale/t208xqds/ddr.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t208xqds/ddr.h b/board/freescale/t208xqds/ddr.h
index 9dd39813bf0..609790c10d3 100644
--- a/board/freescale/t208xqds/ddr.h
+++ b/board/freescale/t208xqds/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index c2fcbfeedf6..35371cb4f24 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -29,6 +29,7 @@
 #include <fsl_dtsec.h>
 #include <asm/fsl_serdes.h>
 #include <hwconfig.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 #include "../common/qixis.h"
diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c
index 7902b746d56..2e7b2e20a44 100644
--- a/board/freescale/t208xqds/spl.c
+++ b/board/freescale/t208xqds/spl.c
@@ -18,6 +18,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/qixis.h"
 #include "t208xqds_qixis.h"
 #include "../common/spl.h"
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index c25b0a72ce5..a20242a0b6c 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -15,6 +15,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xrdb/cpld.c b/board/freescale/t208xrdb/cpld.c
index cf39623b7ae..5d5ba5dbbd7 100644
--- a/board/freescale/t208xrdb/cpld.c
+++ b/board/freescale/t208xrdb/cpld.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include "cpld.h"
 
diff --git a/board/freescale/t208xrdb/cpld.h b/board/freescale/t208xrdb/cpld.h
index bd6c203742e..39530084aa9 100644
--- a/board/freescale/t208xrdb/cpld.h
+++ b/board/freescale/t208xrdb/cpld.h
@@ -6,6 +6,7 @@
 /*
  * CPLD register set of T2080RDB board-specific.
  */
+#include <asm/types.h>
 struct cpld_data {
 	u8 chip_id1;		/* 0x00 - Chip ID1 register */
 	u8 chip_id2;		/* 0x01 - Chip ID2 register */
diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
index ace941da31b..be9ee0a8419 100644
--- a/board/freescale/t208xrdb/ddr.c
+++ b/board/freescale/t208xrdb/ddr.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t208xrdb/ddr.h b/board/freescale/t208xrdb/ddr.h
index c00f1781667..7d23c361af3 100644
--- a/board/freescale/t208xrdb/ddr.h
+++ b/board/freescale/t208xrdb/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index fda113f0156..91d52c66b39 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -25,6 +25,7 @@
 #include <phy.h>
 #include <fsl_dtsec.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 int board_eth_init(struct bd_info *bis)
diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index 8ef46a09c95..dcf61b455df 100644
--- a/board/freescale/t208xrdb/spl.c
+++ b/board/freescale/t208xrdb/spl.c
@@ -18,6 +18,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index bc5152810ef..248912a6a65 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c
index 023b39852a7..ab8354bff60 100644
--- a/board/freescale/t4rdb/cpld.c
+++ b/board/freescale/t4rdb/cpld.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include "cpld.h"
diff --git a/board/freescale/t4rdb/cpld.h b/board/freescale/t4rdb/cpld.h
index dc3f9f3c26c..7bbd32ba811 100644
--- a/board/freescale/t4rdb/cpld.h
+++ b/board/freescale/t4rdb/cpld.h
@@ -11,6 +11,7 @@
 /*
  * CPLD register set. Feel free to add board-specific #ifdefs where necessary.
  */
+#include <asm/types.h>
 struct cpld_data {
 	u8 chip_id1;	/* 0x00 - CPLD Chip ID1 Register */
 	u8 chip_id2;	/* 0x01 - CPLD Chip ID2 Register */
diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index d478a89e216..9a219a9680d 100644
--- a/board/freescale/t4rdb/ddr.c
+++ b/board/freescale/t4rdb/ddr.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t4rdb/ddr.h b/board/freescale/t4rdb/ddr.h
index 74a27796114..0fb8d6faa61 100644
--- a/board/freescale/t4rdb/ddr.h
+++ b/board/freescale/t4rdb/ddr.h
@@ -5,6 +5,7 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
+#include <asm/types.h>
 struct board_specific_parameters {
 	u32 n_ranks;
 	u32 datarate_mhz_high;
diff --git a/board/freescale/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index def5e6c8b32..9b09087d732 100644
--- a/board/freescale/t4rdb/eth.c
+++ b/board/freescale/t4rdb/eth.c
@@ -28,6 +28,7 @@
 #include <fsl_dtsec.h>
 #include <asm/fsl_serdes.h>
 #include <hwconfig.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "../common/fman.h"
diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c
index 8ae19d00685..c7da9612d75 100644
--- a/board/freescale/t4rdb/spl.c
+++ b/board/freescale/t4rdb/spl.c
@@ -21,6 +21,7 @@
 #include <i2c.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "t4rdb.h"
 
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 3cd6eb8e8bb..3afcfc4e302 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c
index c9c9beb86c7..7e300bcf2a6 100644
--- a/board/friendlyarm/nanopi2/board.c
+++ b/board/friendlyarm/nanopi2/board.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/nx_gpio.h>
diff --git a/board/friendlyarm/nanopi2/hwrev.c b/board/friendlyarm/nanopi2/hwrev.c
index b1e23a48a80..61a07dc6547 100644
--- a/board/friendlyarm/nanopi2/hwrev.c
+++ b/board/friendlyarm/nanopi2/hwrev.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/nx_gpio.h>
diff --git a/board/friendlyarm/nanopi2/hwrev.h b/board/friendlyarm/nanopi2/hwrev.h
index 1b1a828afb3..7bb43bbfe4a 100644
--- a/board/friendlyarm/nanopi2/hwrev.h
+++ b/board/friendlyarm/nanopi2/hwrev.h
@@ -7,6 +7,7 @@
 #ifndef __BD_HW_REV_H__
 #define __BD_HW_REV_H__
 
+#include <asm/types.h>
 extern void bd_hwrev_init(void);
 extern void bd_base_rev_init(void);
 extern u32 get_board_rev(void);
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 75677b11dd2..03a69882e30 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
@@ -18,6 +19,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 8e3c3e1ad7a..66ee4f1edcd 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -20,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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 7d6509be77b..aeec4d2955e 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/bitops.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index d98fa4bf2ee..d00cdf644f3 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -16,6 +16,7 @@
 #include <i2c.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ventana_eeprom.h"
 #include "gsc.h"
diff --git a/board/gateworks/gw_ventana/gsc.h b/board/gateworks/gw_ventana/gsc.h
index 6dcaafadf37..51128416ab9 100644
--- a/board/gateworks/gw_ventana/gsc.h
+++ b/board/gateworks/gw_ventana/gsc.h
@@ -8,6 +8,7 @@
 #ifndef __ASSEMBLY__
 
 /* i2c slave addresses */
+#include <linux/types.h>
 #define GSC_SC_ADDR		0x20
 #define GSC_RTC_ADDR		0x68
 #define GSC_HWMON_ADDR		0x29
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index fe6a7efe3e3..bcb7d0edbd2 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -44,6 +44,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.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 8cb3b479b70..766c5d51f41 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <spl.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include "gsc.h"
 #include "common.h"
diff --git a/board/gateworks/gw_ventana/ventana_eeprom.h b/board/gateworks/gw_ventana/ventana_eeprom.h
index 4fa085b320c..61bfeb2b490 100644
--- a/board/gateworks/gw_ventana/ventana_eeprom.h
+++ b/board/gateworks/gw_ventana/ventana_eeprom.h
@@ -6,6 +6,7 @@
 #ifndef _VENTANA_EEPROM_
 #define _VENTANA_EEPROM_
 
+#include <asm/types.h>
 struct ventana_board_info {
 	u8 mac0[6];          /* 0x00: MAC1 */
 	u8 mac1[6];          /* 0x06: MAC2 */
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 241a36f7a59..ba967b5d7da 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -20,6 +20,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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/dt_helpers.c b/board/gdsys/a38x/dt_helpers.c
index 23525b7ed52..0ff146c1713 100644
--- a/board/gdsys/a38x/dt_helpers.c
+++ b/board/gdsys/a38x/dt_helpers.c
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <asm-generic/gpio.h>
 #include <dm.h>
+#include <linux/types.h>
 
 int fdt_disable_by_ofname(void *rw_fdt_blob, char *ofname)
 {
diff --git a/board/gdsys/a38x/dt_helpers.h b/board/gdsys/a38x/dt_helpers.h
index 30dbf298b69..bdd19c9c271 100644
--- a/board/gdsys/a38x/dt_helpers.h
+++ b/board/gdsys/a38x/dt_helpers.h
@@ -8,6 +8,7 @@
 #define __DT_HELPERS_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 int fdt_disable_by_ofname(void *rw_fdt_blob, char *ofname);
 bool dm_i2c_simple_probe(struct udevice *bus, uint chip_addr);
 int request_gpio_by_name(struct gpio_desc *gpio, const char *gpio_dev_name,
diff --git a/board/gdsys/a38x/hre.c b/board/gdsys/a38x/hre.c
index 93d8045d53b..aaa5b2bdb0f 100644
--- a/board/gdsys/a38x/hre.c
+++ b/board/gdsys/a38x/hre.c
@@ -10,10 +10,12 @@
 #include <fs.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <tpm-v1.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <u-boot/sha1.h>
 #include <asm/byteorder.h>
diff --git a/board/gdsys/a38x/hre.h b/board/gdsys/a38x/hre.h
index 154a02761dc..b4b6f3c04e1 100644
--- a/board/gdsys/a38x/hre.h
+++ b/board/gdsys/a38x/hre.h
@@ -8,6 +8,7 @@
 #define __HRE_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct key_program {
 	uint32_t magic;
 	uint32_t code_crc;
diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c
index bd66cd52b86..902b3714ec2 100644
--- a/board/gdsys/a38x/hydra.c
+++ b/board/gdsys/a38x/hydra.c
@@ -1,9 +1,11 @@
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h> /* ctrlc */
 #include <pci.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include "hydra.h"
 
diff --git a/board/gdsys/a38x/hydra.h b/board/gdsys/a38x/hydra.h
index 26562a560a0..8aec2cf513b 100644
--- a/board/gdsys/a38x/hydra.h
+++ b/board/gdsys/a38x/hydra.h
@@ -1,3 +1,4 @@
+#include <linux/types.h>
 struct ihs_fpga {
 	u32 reflection_low;		/* 0x0000 */
 	u32 versions;			/* 0x0004 */
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index c784421a701..ddbeb22d7d4 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <dm.h>
 #include <miiphy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm-generic/gpio.h>
@@ -9,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ihs_phys.h"
 #include "dt_helpers.h"
diff --git a/board/gdsys/a38x/ihs_phys.h b/board/gdsys/a38x/ihs_phys.h
index c4bec4d46c0..37ec758ffd3 100644
--- a/board/gdsys/a38x/ihs_phys.h
+++ b/board/gdsys/a38x/ihs_phys.h
@@ -1,2 +1,3 @@
+#include <linux/types.h>
 uint calculate_octo_phy_mask(void);
 int init_octo_phys(uint octo_phy_mask);
diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c
index be41844dcf1..70ed70eaeef 100644
--- a/board/gdsys/a38x/keyprogram.c
+++ b/board/gdsys/a38x/keyprogram.c
@@ -13,6 +13,7 @@
 #include <linux/ctype.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "hre.h"
 
diff --git a/board/gdsys/a38x/spl.c b/board/gdsys/a38x/spl.c
index a06acd64f9f..552c60a8edb 100644
--- a/board/gdsys/a38x/spl.c
+++ b/board/gdsys/a38x/spl.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <stdio.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 
 void spl_board_init(void)
 {
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c
index 881f2cc7bf2..5a3ffa21735 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -6,12 +6,14 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <gdsys_fpga.h>
 
diff --git a/board/gdsys/common/dp501.c b/board/gdsys/common/dp501.c
index 55be6bc2957..38938cc767c 100644
--- a/board/gdsys/common/dp501.c
+++ b/board/gdsys/common/dp501.c
@@ -23,6 +23,7 @@ int dp501_i2c[] = CONFIG_SYS_DP501_I2C;
 int dp501_base[] = CONFIG_SYS_DP501_BASE;
 #endif
 
+#include <linux/types.h>
 static void dp501_setbits(u8 addr, u8 reg, u8 mask)
 {
 	u8 val;
diff --git a/board/gdsys/common/dp501.h b/board/gdsys/common/dp501.h
index 9f3238638f1..3eb8b113459 100644
--- a/board/gdsys/common/dp501.h
+++ b/board/gdsys/common/dp501.h
@@ -25,6 +25,7 @@
 #define _DP501_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 void dp501_powerup(u8 addr);
 void dp501_powerdown(u8 addr);
 int dp501_probe(unsigned screen, bool power);
diff --git a/board/gdsys/common/fanctrl.h b/board/gdsys/common/fanctrl.h
index ab7e58def5a..e246b5d304f 100644
--- a/board/gdsys/common/fanctrl.h
+++ b/board/gdsys/common/fanctrl.h
@@ -7,6 +7,7 @@
 #ifndef _FANCTRL_H_
 #define _FANCTRL_H_
 
+#include <asm/types.h>
 void init_fan_controller(u8 addr);
 
 #endif
diff --git a/board/gdsys/common/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c
index ea91d767d5b..6dc057ccca8 100644
--- a/board/gdsys/common/ihs_mdio.c
+++ b/board/gdsys/common/ihs_mdio.c
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <miiphy.h>
 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
diff --git a/board/gdsys/common/ihs_mdio.h b/board/gdsys/common/ihs_mdio.h
index d0a4b0d7a88..7fd07f6c974 100644
--- a/board/gdsys/common/ihs_mdio.h
+++ b/board/gdsys/common/ihs_mdio.h
@@ -7,6 +7,7 @@
 #ifndef _IHS_MDIO_H_
 #define _IHS_MDIO_H_
 
+#include <asm/types.h>
 struct ihs_mdio_info {
 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
 	u32 fpga;
diff --git a/board/gdsys/common/ioep-fpga.c b/board/gdsys/common/ioep-fpga.c
index 115f10c30c7..d8d6df75643 100644
--- a/board/gdsys/common/ioep-fpga.c
+++ b/board/gdsys/common/ioep-fpga.c
@@ -384,6 +384,7 @@ static int get_features(unsigned int fpga, struct fpga_features *features)
 	u16 raw_extended_features;
 #endif
 
+#include <asm/types.h>
 	memset(features, 0, sizeof(struct fpga_features));
 
 	FPGA_GET_REG(fpga, fpga_features, &raw_features);
diff --git a/board/gdsys/common/mclink.h b/board/gdsys/common/mclink.h
index 4dc40588924..6baf8e1d0f5 100644
--- a/board/gdsys/common/mclink.h
+++ b/board/gdsys/common/mclink.h
@@ -7,6 +7,7 @@
 #ifndef _MCLINK_H_
 #define _MCLINK_H_
 
+#include <asm/types.h>
 int mclink_probe(void);
 int mclink_send(u8 slave, u16 addr, u16 data);
 int mclink_receive(u8 slave, u16 addr, u16 *data);
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
index a43031d513d..d435d1e23c8 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -67,6 +67,7 @@
 
 unsigned int base_width;
 unsigned int base_height;
+#include <linux/types.h>
 size_t bufsize;
 u16 *buf;
 
diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c
index e306d7e82fe..cca6cb02c54 100644
--- a/board/gdsys/common/osd_cmd.c
+++ b/board/gdsys/common/osd_cmd.c
@@ -18,6 +18,7 @@
 #include <malloc.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
diff --git a/board/gdsys/common/phy.c b/board/gdsys/common/phy.c
index cfa681c2e19..d3fd3541440 100644
--- a/board/gdsys/common/phy.c
+++ b/board/gdsys/common/phy.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <time.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #include <miiphy.h>
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index 1d21d13e4c9..177cfb29d9c 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
@@ -26,6 +27,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mpc8308.h"
 
diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c
index 0f90f8ad327..702f8084f9b 100644
--- a/board/gdsys/mpc8308/mpc8308.c
+++ b/board/gdsys/mpc8308/mpc8308.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/global_data.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include "mpc8308.h"
 #include <gdsys_fpga.h>
diff --git a/board/gdsys/mpc8308/mpc8308.h b/board/gdsys/mpc8308/mpc8308.h
index 1e4f24fb2ae..dfd3160f145 100644
--- a/board/gdsys/mpc8308/mpc8308.h
+++ b/board/gdsys/mpc8308/mpc8308.h
@@ -1,6 +1,7 @@
 #ifndef __MPC8308_H_
 #define __MPC8308_H_
 
+#include <asm/types.h>
 void setbits_gpio0_out(u32 mask);
 void clrbits_gpio0_out(u32 mask);
 
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index 5df68fdd6ca..f0d23ff538a 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
@@ -26,6 +27,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mpc8308.h"
 
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index 713cb6456e8..56b63d6b23f 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -4,6 +4,8 @@
  * Reinhard Pfau, Guntermann & Drunck GmbH, reinhard.pfau at gdsys.cc
  */
 
+#include <stdbool.h>
+#include <linux/types.h>
 /* TODO: some more #ifdef's to avoid unneeded code for stage 1 / stage 2 */
 
 #ifdef CCDM_ID_DEBUG
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 619e8073253..4161f55c897 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -37,6 +37,7 @@
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/board/gdsys/p1022/ddr.c b/board/gdsys/p1022/ddr.c
index 1ed8b9ff283..9b4c97987d1 100644
--- a/board/gdsys/p1022/ddr.c
+++ b/board/gdsys/p1022/ddr.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.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 8af03534c81..574e522f6ea 100644
--- a/board/gdsys/p1022/diu.c
+++ b/board/gdsys/p1022/diu.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
diff --git a/board/gdsys/p1022/sdhc_boot.c b/board/gdsys/p1022/sdhc_boot.c
index 6a4a6ef6af2..2211c7b7f5e 100644
--- a/board/gdsys/p1022/sdhc_boot.c
+++ b/board/gdsys/p1022/sdhc_boot.c
@@ -23,6 +23,7 @@
 #include <common.h>
 #include <mmc.h>
 #include <malloc.h>
+#include <asm/types.h>
 
 /*
  * The environment variables are written to just after the u-boot image
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index a4ade1a9419..387229691dc 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -7,6 +7,7 @@
 
 #include <image.h>
 #include <init.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/clock.h>
@@ -34,6 +35,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <power/da9063_pmic.h>
 #include <input.h>
diff --git a/board/ge/common/ge_common.c b/board/ge/common/ge_common.c
index 4885c997929..6fd4e87f677 100644
--- a/board/ge/common/ge_common.c
+++ b/board/ge/common/ge_common.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <asm/types.h>
 #include <dm/uclass.h>
 #include <rtc.h>
 #include <linux/errno.h>
diff --git a/board/ge/common/vpd_reader.c b/board/ge/common/vpd_reader.c
index cdf96802d9e..0937a4b3a8d 100644
--- a/board/ge/common/vpd_reader.c
+++ b/board/ge/common/vpd_reader.c
@@ -12,6 +12,7 @@
 #include <dm/uclass.h>
 #include <linux/bch.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "vpd_reader.h"
 
 /* BCH configuration */
diff --git a/board/ge/common/vpd_reader.h b/board/ge/common/vpd_reader.h
index 2c1028bfbe2..d3ee4f9e301 100644
--- a/board/ge/common/vpd_reader.h
+++ b/board/ge/common/vpd_reader.h
@@ -3,6 +3,7 @@
  * Copyright 2016 General Electric Company
  */
 
+#include <linux/types.h>
 struct vpd_cache;
 
 /*
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index bf813303ed4..8959b61d6af 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -32,6 +32,7 @@
 #include <fsl_esdhc_imx.h>
 #include <asm/gpio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <dialog_pmic.h>
 #include <fsl_pmic.h>
diff --git a/board/ge/mx53ppd/mx53ppd_video.c b/board/ge/mx53ppd/mx53ppd_video.c
index cf56983925f..792f5896e10 100644
--- a/board/ge/mx53ppd/mx53ppd_video.c
+++ b/board/ge/mx53ppd/mx53ppd_video.c
@@ -21,6 +21,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <panel.h>
+#include <linux/types.h>
 
 static int detect_lcd(struct display_info_t const *dev)
 {
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index d309a72a52d..379ee57c651 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -29,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index 7c86fe864df..7594d70a3bf 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -26,6 +26,7 @@
 #include <spl.h>
 #include <watchdog.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index 986fbd6ef37..449a323847b 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -34,6 +34,7 @@
 #include <netdev.h>
 #include <spl.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/highbank/ahci.c b/board/highbank/ahci.c
index 9c057278ace..f2dd9a01e27 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 <asm/types.h>
 #include <linux/delay.h>
 
 #define CPHY_MAP(dev, addr) ((((dev) & 0x1f) << 7) | (((addr) >> 9) & 0x7f))
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 144193f4455..bf7859d2a7a 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <fdt_support.h>
@@ -15,6 +16,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #include <linux/sizes.h>
 #include <asm/io.h>
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index 5525ec91872..bc6c559a789 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <usb.h>
 #include <linux/delay.h>
+#include <linux/types.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 256b951586e..4e2f932208f 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -20,6 +20,7 @@
 #include <linux/arm-smccc.h>
 #include <linux/delay.h>
 #include <linux/psci.h>
+#include <linux/types.h>
 
 #define PMIC_REG_TO_BUS_ADDR(x) (x << 2)
 #define PMIC_VSEL_MASK		0x7
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index 9137b800f7f..7db5de0ce98 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index 7ceb6d3d04b..c801278fa1f 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/imgtec/boston/checkboard.c b/board/imgtec/boston/checkboard.c
index 9d3a90282a0..a8462ab0ae3 100644
--- a/board/imgtec/boston/checkboard.c
+++ b/board/imgtec/boston/checkboard.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/mipsregs.h>
diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c
index 6ece140774e..5ceb7eb68df 100644
--- a/board/imgtec/boston/ddr.c
+++ b/board/imgtec/boston/ddr.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index 11f140f172e..8aa910998c3 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <init.h>
 #include <net.h>
@@ -15,6 +16,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index dd64f9dffa9..3b60400be7e 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <ide.h>
 #include <init.h>
 #include <net.h>
@@ -20,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/addrspace.h>
 #include <asm/io.h>
diff --git a/board/imgtec/malta/superio.c b/board/imgtec/malta/superio.c
index cb5e0589a71..c5550f1b599 100644
--- a/board/imgtec/malta/superio.c
+++ b/board/imgtec/malta/superio.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define SIO_CONF_PORT		0x3f0
diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c
index 755162070cd..e9fdad0c6fc 100644
--- a/board/intel/edison/edison.c
+++ b/board/intel/edison/edison.c
@@ -9,6 +9,7 @@
 #include <mmc.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <u-boot/md5.h>
 #include <usb.h>
diff --git a/board/intel/galileo/galileo.c b/board/intel/galileo/galileo.c
index 720350d0f7f..c4b0e97bb9f 100644
--- a/board/intel/galileo/galileo.c
+++ b/board/intel/galileo/galileo.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch/device.h>
 #include <asm/arch/quark.h>
+#include <asm/types.h>
 
 /*
  * Intel Galileo gen2 board uses GPIO Resume Well bank pin0 as the PERST# pin.
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index 1028f97ff3a..bd35784d26a 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -27,6 +27,7 @@
 #include <fsl_esdhc_imx.h>
 #include <asm/gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index 1bafcb977e1..15b1b093925 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -12,6 +12,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "iconnect.h"
 
diff --git a/board/is1/qts/pinmux_config.h b/board/is1/qts/pinmux_config.h
index bf79975b918..3deeac12a5e 100644
--- a/board/is1/qts/pinmux_config.h
+++ b/board/is1/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/is1/qts/sdram_config.h b/board/is1/qts/sdram_config.h
index 2573171abeb..c45660729d0 100644
--- a/board/is1/qts/sdram_config.h
+++ b/board/is1/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index 2f53925a9cf..2e0bf59d31a 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -34,6 +34,7 @@
 #include <asm/u-boot.h>
 #include <jffs2/load_kernel.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 3167b5c097f..91e8ead3d95 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -21,6 +21,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c
index 387c2271046..eca81f8b2b0 100644
--- a/board/k+p/kp_imx53/kp_id_rev.c
+++ b/board/k+p/kp_imx53/kp_id_rev.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "kp_id_rev.h"
 #include <net.h>
 
diff --git a/board/k+p/kp_imx53/kp_id_rev.h b/board/k+p/kp_imx53/kp_id_rev.h
index aa64173926c..6fe29fdefed 100644
--- a/board/k+p/kp_imx53/kp_id_rev.h
+++ b/board/k+p/kp_imx53/kp_id_rev.h
@@ -12,6 +12,8 @@
 #ifndef __KP_ID_REV_H_
 #define __KP_ID_REV_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct id_eeprom {
 	u8 hrcw_primary[0x20];
 	u8 mac[6];              /* 0x20 ... 0x25 */
diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c
index 662fd1f24b2..9265ffa8ccb 100644
--- a/board/k+p/kp_imx53/kp_imx53.c
+++ b/board/k+p/kp_imx53/kp_imx53.c
@@ -17,6 +17,7 @@
 #include <asm/arch/clock.h>
 #include <asm/gpio.h>
 #include <env.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <power/pmic.h>
 #include <fsl_pmic.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index bee4c398585..b51f4355386 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
@@ -21,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index d87c0ac8f15..df6f15142a9 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -23,6 +23,7 @@
 #include <linux/ctype.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_POST)
 #include "post.h"
diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h
index 8251de4db8f..fa7796fc639 100644
--- a/board/keymile/common/common.h
+++ b/board/keymile/common/common.h
@@ -7,6 +7,7 @@
 #ifndef __KEYMILE_COMMON_H
 #define __KEYMILE_COMMON_H
 
+#include <asm/types.h>
 #define WRG_RESET	0x80
 #define H_OPORTS_14	0x40
 #define WRG_LED		0x02
diff --git a/board/keymile/common/qrio.c b/board/keymile/common/qrio.c
index 4efcc1adee5..32d960e14cc 100644
--- a/board/keymile/common/qrio.c
+++ b/board/keymile/common/qrio.c
@@ -5,7 +5,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 
diff --git a/board/keymile/common/qrio.h b/board/keymile/common/qrio.h
index ead6efcca51..3317594c450 100644
--- a/board/keymile/common/qrio.h
+++ b/board/keymile/common/qrio.h
@@ -9,6 +9,7 @@
 
 /* QRIO GPIO ports */
 #include <stdbool.h>
+#include <asm/types.h>
 #define QRIO_GPIO_A		0x40
 #define QRIO_GPIO_B		0x60
 
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index afa53808a06..2551bcdb498 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <fdt_support.h>
 #include <init.h>
@@ -33,6 +34,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <post.h>
+#include <linux/types.h>
 
 #include "../common/common.h"
 
diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c
index 55c993481c2..e0887940a34 100644
--- a/board/keymile/km83xx/km83xx_i2c.c
+++ b/board/keymile/km83xx/km83xx_i2c.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
+#include <linux/types.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 2e60221f228..ae528a719fb 100644
--- a/board/keymile/km_arm/fpga_config.c
+++ b/board/keymile/km_arm/fpga_config.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index bd833e54faf..79498acf062 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -29,6 +29,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "../common/common.h"
 
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index ffb31b8a0c0..d03035e6ec7 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -27,6 +27,7 @@
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
 #include <fm_eth.h>
+#include <linux/types.h>
 
 #include "../common/common.h"
 #include "../common/qrio.h"
diff --git a/board/keymile/kmp204x/pci.c b/board/keymile/kmp204x/pci.c
index 7f92d6b322d..630a4e42442 100644
--- a/board/keymile/kmp204x/pci.c
+++ b/board/keymile/kmp204x/pci.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/fsl_pci.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/board/keymile/secu1/qts/pinmux_config.h b/board/keymile/secu1/qts/pinmux_config.h
index a9406060edc..e14c0956e38 100644
--- a/board/keymile/secu1/qts/pinmux_config.h
+++ b/board/keymile/secu1/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	3, /* EMACIO0 */
 	3, /* EMACIO1 */
diff --git a/board/keymile/secu1/qts/sdram_config.h b/board/keymile/secu1/qts/sdram_config.h
index b0ff86ef381..740573887ee 100644
--- a/board/keymile/secu1/qts/sdram_config.h
+++ b/board/keymile/secu1/qts/sdram_config.h
@@ -8,6 +8,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/keymile/secu1/socfpga.c b/board/keymile/secu1/socfpga.c
index 4afaf0dec72..2ce7396ceb9 100644
--- a/board/keymile/secu1/socfpga.c
+++ b/board/keymile/secu1/socfpga.c
@@ -6,6 +6,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <asm/gpio.h>
+#include <linux/types.h>
 
 #include "../common/common.h"
 
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index 5b0c198940a..bd41389fe95 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -15,6 +15,7 @@
 #include <netdev.h>
 #include <i2c.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index 4dd326402e8..98c6447ba64 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index 23b4ba25f78..572bd512673 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -42,6 +42,7 @@
 #include <mmc.h>
 #include <netdev.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <stdio_dev.h>
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index f79a2d46a69..4aa78fb7b38 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -26,6 +26,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/arch/mx6-ddr.h>
 
diff --git a/board/kosagi/novena/video.c b/board/kosagi/novena/video.c
index f90a9f990c3..c06a4eac506 100644
--- a/board/kosagi/novena/video.c
+++ b/board/kosagi/novena/video.c
@@ -33,6 +33,7 @@
 #include <malloc.h>
 #include <stdio_dev.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "novena.h"
 
diff --git a/board/laird/wb50n/wb50n.c b/board/laird/wb50n/wb50n.c
index 13ac53ab21a..830e0a51c1c 100644
--- a/board/laird/wb50n/wb50n.c
+++ b/board/laird/wb50n/wb50n.c
@@ -20,6 +20,7 @@
 #include <spl.h>
 #include <asm/arch/atmel_mpddrc.h>
 #include <asm/arch/at91_wdt.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 92c13c67ab2..7930c74be54 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -23,6 +23,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <hwconfig.h>
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index 3de18af2a1d..6653ced5be5 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <init.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index e6ab33c74ac..f9c4fc643c1 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -27,6 +28,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <i2c.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 1580b8d3cf9..1d403eaa947 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -23,6 +23,7 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/mx6-pins.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "asm/arch/crm_regs.h"
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 1da59eb0668..c412fb5c434 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -27,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/mx6-ddr.h>
 /*
diff --git a/board/liebherr/xea/spl_xea.c b/board/liebherr/xea/spl_xea.c
index 00c1c078f90..a70e2828d49 100644
--- a/board/liebherr/xea/spl_xea.c
+++ b/board/liebherr/xea/spl_xea.c
@@ -18,6 +18,7 @@
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define	MUX_CONFIG_LCD	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 7dd6cc34156..8bee42a5be2 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -34,6 +34,7 @@
 #include <errno.h>
 #include <usb.h>
 #include <serial.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 #include <spl.h>
diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index e0e57868546..4c259189fd3 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -26,6 +26,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/musb.h>
 #include <asm/mach-types.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
index 823d42c953f..20de0f1b04f 100644
--- a/board/logicpd/imx6/imx6logic.c
+++ b/board/logicpd/imx6/imx6logic.c
@@ -30,6 +30,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index e5a9ffdda55..32e66ebaa0c 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -29,6 +29,7 @@
 #include <asm/gpio.h>
 #include <asm/omap_mmc.h>
 #include <asm/mach-types.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/rawnand.h>
 #include <asm/omap_musb.h>
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 0a81b060b23..3ab935a3358 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -39,6 +39,7 @@
 #include <splash.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/ehci-ci.h>
 #include <video_console.h>
 
diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
index 96bb8c8f425..25e73bd9506 100644
--- a/board/microchip/pic32mzda/pic32mzda.c
+++ b/board/microchip/pic32mzda/pic32mzda.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <dt-bindings/clock/microchip,clock.h>
+#include <linux/types.h>
 #include <mach/pic32.h>
 
 #ifdef CONFIG_DISPLAY_BOARDINFO
diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c
index d4af394670c..380114a99a5 100644
--- a/board/mini-box/picosam9g45/picosam9g45.c
+++ b/board/mini-box/picosam9g45/picosam9g45.c
@@ -31,6 +31,7 @@
 #endif
 #include <netdev.h>
 #include <asm/mach-types.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mpc8308_p1m/sdram.c b/board/mpc8308_p1m/sdram.c
index 62a2d8a53af..e44936b0327 100644
--- a/board/mpc8308_p1m/sdram.c
+++ b/board/mpc8308_p1m/sdram.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/board/mscc/common/spi.c b/board/mscc/common/spi.c
index b1a71f4c292..78b9b962db1 100644
--- a/board/mscc/common/spi.c
+++ b/board/mscc/common/spi.c
@@ -7,6 +7,7 @@
 #include <stdbool.h>
 #include <asm/io.h>
 #include <spi.h>
+#include <asm/types.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 c61e44ee8b4..8698954cbe0 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <image.h>
 #include <init.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index 584062c9ee9..b276ef3c6c0 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c
index d7b42d177a7..7e250ac77ec 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c
index cfc3529c348..cb7d902d007 100644
--- a/board/netgear/dgnd3700v2/dgnd3700v2.c
+++ b/board/netgear/dgnd3700v2/dgnd3700v2.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 6d9f8c988bf..23f63c7d72f 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -39,6 +39,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/board/nokia/rx51/rx51.h b/board/nokia/rx51/rx51.h
index fa1b42bf21e..41d8b32e2ec 100644
--- a/board/nokia/rx51/rx51.h
+++ b/board/nokia/rx51/rx51.h
@@ -13,6 +13,7 @@
 #define _RX51_H_
 
 /* Needed for ROM SMC call */
+#include <asm/types.h>
 struct emu_hal_params_rx51 {
 	u32 num_params;
 	u32 param1;
diff --git a/board/nokia/rx51/tag_omap.h b/board/nokia/rx51/tag_omap.h
index b99d6b7de17..24ad4729781 100644
--- a/board/nokia/rx51/tag_omap.h
+++ b/board/nokia/rx51/tag_omap.h
@@ -15,6 +15,7 @@
  *  Code copied from maemo kernel 2.6.28 file
  *  arch/arm/plat-omap/include/mach/board.h
  *
+#include <asm/types.h>
  *  Information structures for board-specific data
  *
  *  Copyright (C) 2004	Nokia Corporation
diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c
index 1fe5f851731..3d27d75c7b4 100644
--- a/board/nvidia/cardhu/cardhu.c
+++ b/board/nvidia/cardhu/cardhu.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinmux-config-cardhu.h"
 #include <i2c.h>
 
diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c
index ac8df9c3806..e3b53f89d65 100644
--- a/board/nvidia/dalmore/dalmore.c
+++ b/board/nvidia/dalmore/dalmore.c
@@ -10,6 +10,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/gp_padctrl.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinmux-config-dalmore.h"
 #include <i2c.h>
 
diff --git a/board/nvidia/e2220-1170/e2220-1170.c b/board/nvidia/e2220-1170/e2220-1170.c
index 4c59b61e5da..b6747ed093f 100644
--- a/board/nvidia/e2220-1170/e2220-1170.c
+++ b/board/nvidia/e2220-1170/e2220-1170.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
+#include <linux/types.h>
 #include "../p2571/max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/p2371-0000/p2371-0000.c b/board/nvidia/p2371-0000/p2371-0000.c
index 4c59b61e5da..b6747ed093f 100644
--- a/board/nvidia/p2371-0000/p2371-0000.c
+++ b/board/nvidia/p2371-0000/p2371-0000.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
+#include <linux/types.h>
 #include "../p2571/max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index 7cc163a467e..ce3cfad6071 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -19,6 +19,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/cboot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../p2571/max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/p2571/p2571.c b/board/nvidia/p2571/p2571.c
index e8760ca5172..ca148425a8e 100644
--- a/board/nvidia/p2571/p2571.c
+++ b/board/nvidia/p2571/p2571.c
@@ -11,6 +11,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/gpio.h>
+#include <linux/types.h>
 #include "max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
index b5925f30932..9d60f4bb919 100644
--- a/board/nvidia/p2771-0000/p2771-0000.c
+++ b/board/nvidia/p2771-0000/p2771-0000.c
@@ -15,6 +15,7 @@
 #include <linux/libfdt.h>
 #include <asm/arch-tegra/cboot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../p2571/max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/p3450-0000/p3450-0000.c b/board/nvidia/p3450-0000/p3450-0000.c
index 868bab22ef4..bb8f86581f9 100644
--- a/board/nvidia/p3450-0000/p3450-0000.c
+++ b/board/nvidia/p3450-0000/p3450-0000.c
@@ -18,6 +18,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../p2571/max77620_init.h"
 
 void pin_mux_mmc(void)
diff --git a/board/nvidia/venice2/as3722_init.c b/board/nvidia/venice2/as3722_init.c
index ba676547d3e..7b2daed843a 100644
--- a/board/nvidia/venice2/as3722_init.c
+++ b/board/nvidia/venice2/as3722_init.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "as3722_init.h"
 
 /* AS3722-PMIC-specific early init code - get CPU rails up, etc */
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c
index 31d148b885b..d7b0e3aeb0e 100644
--- a/board/olimex/mx23_olinuxino/spl_boot.c
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_SSP	(MXS_PAD_8MA | MXS_PAD_PULLUP)
diff --git a/board/phytec/pcl063/pcl063.c b/board/phytec/pcl063/pcl063.c
index 8ac6eb01caa..ca8f6b1947d 100644
--- a/board/phytec/pcl063/pcl063.c
+++ b/board/phytec/pcl063/pcl063.c
@@ -16,6 +16,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <fsl_esdhc_imx.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <miiphy.h>
diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c
index 662f3d7e12d..7242cdc0d8b 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -18,6 +18,7 @@
 #include <asm/arch/sys_proto.h>
 #include <fsl_esdhc_imx.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
 
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index ab2513ed071..b83c2502533 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -19,6 +19,7 @@
 #include <env.h>
 #include <led.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c
index 41a391ef0ef..7b54d3dda65 100644
--- a/board/phytec/pcm058/pcm058.c
+++ b/board/phytec/pcm058/pcm058.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index 97986b67f1c..37e60188c10 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -36,6 +36,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/sections.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 141707c7b9a..920f9041766 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -19,6 +19,7 @@
 #include <i2c_eeprom.h>
 #include <netdev.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #include "som.h"
 #include <power/regulator.h>
 #include <power/rk8xx_pmic.h>
diff --git a/board/phytec/phycore_rk3288/som.h b/board/phytec/phycore_rk3288/som.h
index f627264f5f6..74604c8ec6c 100644
--- a/board/phytec/phycore_rk3288/som.h
+++ b/board/phytec/phycore_rk3288/som.h
@@ -5,6 +5,7 @@
  */
 
 /*
+#include <compiler.h>
  * rk3288_som struct represents the eeprom layout for PHYTEC RK3288 based SoMs
  */
 struct rk3288_som {
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index ce0cbdb9c4a..e5ce66feb9d 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -20,6 +20,7 @@
 #include <linux/arm-smccc.h>
 #include <linux/kernel.h>
 #include <scsi.h>
+#include <linux/types.h>
 #include "cpu.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
index 4ad780767ea..dfbd96e876f 100644
--- a/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
+++ b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
@@ -12,6 +12,7 @@
 #include <asm/arch-rockchip/grf_rk3399.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/misc.h>
+#include <asm/types.h>
 #include <linux/printk.h>
 #include <power/regulator.h>
 
diff --git a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
index d79084614f1..2215d659d7d 100644
--- a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
+++ b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
@@ -12,6 +12,7 @@
 #include <asm/arch-rockchip/grf_rk3399.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/misc.h>
+#include <asm/types.h>
 
 #define GRF_IO_VSEL_BT565_SHIFT 0
 #define PMUGRF_CON0_VSEL_SHIFT 8
diff --git a/board/ppcag/bg0900/spl_boot.c b/board/ppcag/bg0900/spl_boot.c
index 7809c844df7..41ae7b9bdfd 100644
--- a/board/ppcag/bg0900/spl_boot.c
+++ b/board/ppcag/bg0900/spl_boot.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_GPMI	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
 #define	MUX_CONFIG_ENET	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index 60a2e19143d..15a1da2d6e1 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
index ac65054136c..fa1e2d49332 100644
--- a/board/qca/ap143/ap143.c
+++ b/board/qca/ap143/ap143.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c
index 1064705d262..f21b7a2c44b 100644
--- a/board/qca/ap152/ap152.c
+++ b/board/qca/ap152/ap152.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index 7d00176ffe6..06eb3c071c4 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -13,6 +13,7 @@
 #include <asm/mipsregs.h>
 #include <asm/io.h>
 #include <netdev.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index ebb7ddb1fb7..b24fcf6077b 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -23,6 +23,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
index ad8db681bd1..169458d100e 100644
--- a/board/qualcomm/dragonboard820c/dragonboard820c.c
+++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
@@ -22,6 +22,7 @@
 #include <linux/bitops.h>
 #include <asm/psci.h>
 #include <asm/gpio.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index afbfdd997a1..760963396ff 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -14,6 +14,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "ib62x0.h"
 
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index c074726f1ae..7ab2965724c 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -14,6 +14,7 @@
 #include <lcd.h>
 #include <memalign.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/gpio.h>
@@ -29,6 +30,7 @@
 #include <watchdog.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index 97379858e4f..caf5bb4d48e 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -32,6 +32,7 @@
 #include <miiphy.h>
 #include <i2c.h>
 #include <div64.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
index 44a8d6c720e..77d62706215 100644
--- a/board/renesas/alt/alt_spl.c
+++ b/board/renesas/alt/alt_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/alt/qos.c b/board/renesas/alt/qos.c
index 2f657505ceb..ae77996d9b5 100644
--- a/board/renesas/alt/qos.c
+++ b/board/renesas/alt/qos.c
@@ -11,6 +11,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
 /* QoS version 0.311 for ES1 and version 0.321 for ES2 */
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index 79bd867c953..af0fefe93d4 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -34,6 +34,7 @@
 #include <mmc.h>
 #include <netdev.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/blanche/qos.c b/board/renesas/blanche/qos.c
index e3ad83ee0c2..98bf0fbc74f 100644
--- a/board/renesas/blanche/qos.c
+++ b/board/renesas/blanche/qos.c
@@ -10,6 +10,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_RMOBILE_EXTRAM_BOOT)
 enum {
diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c
index f9c3f324f83..9946d4e5ab8 100644
--- a/board/renesas/condor/condor.c
+++ b/board/renesas/condor/condor.c
@@ -17,6 +17,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 643bfce33ad..58689756c6d 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -29,6 +29,7 @@
 #include <asm/arch/sh_sdhi.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c
index a6602a52506..b02d3c077fc 100644
--- a/board/renesas/eagle/eagle.c
+++ b/board/renesas/eagle/eagle.c
@@ -28,6 +28,7 @@
 #include <asm/arch/sh_sdhi.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c
index a01ae27e5b2..e06ad5c8afb 100644
--- a/board/renesas/ebisu/ebisu.c
+++ b/board/renesas/ebisu/ebisu.c
@@ -28,6 +28,7 @@
 #include <asm/arch/sh_sdhi.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index 5841da94fc1..37a25eb5b7b 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -30,6 +30,7 @@
 #include <netdev.h>
 #include <miiphy.h>
 #include <i2c.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
index d4708c691b9..916a7880420 100644
--- a/board/renesas/gose/gose_spl.c
+++ b/board/renesas/gose/gose_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/gose/qos.c b/board/renesas/gose/qos.c
index 1c4ebfc6a8a..97c9eaf0fc1 100644
--- a/board/renesas/gose/qos.c
+++ b/board/renesas/gose/qos.c
@@ -11,6 +11,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
 /* QoS version 0.311 */
diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index ef9a12bdc8b..7e5e0dccdc2 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -12,6 +12,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define RZA1_WDT_BASE	0xfcfe0000
 #define WTCSR		0x00
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index e20fed98631..8374c30fbd8 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -32,6 +32,7 @@
 #include <miiphy.h>
 #include <i2c.h>
 #include <div64.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c
index a690022f97b..ca510511a56 100644
--- a/board/renesas/koelsch/koelsch_spl.c
+++ b/board/renesas/koelsch/koelsch_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/koelsch/qos.c b/board/renesas/koelsch/qos.c
index f884e5fe650..f46c69ee4aa 100644
--- a/board/renesas/koelsch/qos.c
+++ b/board/renesas/koelsch/qos.c
@@ -11,6 +11,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 /* QoS version 0.240 for ES1 and version 0.411 for ES2 */
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 636a7b27747..a292c06442a 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -34,6 +34,7 @@
 #include <miiphy.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
index 7cb30ba7212..8f0734e8a28 100644
--- a/board/renesas/lager/lager_spl.c
+++ b/board/renesas/lager/lager_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/lager/qos.c b/board/renesas/lager/qos.c
index f01ca2fac71..bb5933c2a34 100644
--- a/board/renesas/lager/qos.c
+++ b/board/renesas/lager/qos.c
@@ -10,6 +10,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 /* QoS version 0.955 for ES1 and version 0.973 for ES2 */
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index 368cf9550a3..a465cc17d85 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -32,6 +32,7 @@
 #include <miiphy.h>
 #include <i2c.h>
 #include <div64.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c
index d2a93fc5456..a007a566da5 100644
--- a/board/renesas/porter/porter_spl.c
+++ b/board/renesas/porter/porter_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/porter/qos.c b/board/renesas/porter/qos.c
index bca54f7f74c..564f8430fb6 100644
--- a/board/renesas/porter/qos.c
+++ b/board/renesas/porter/qos.c
@@ -12,6 +12,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 /* QoS version 0.240 for ES1 and version 0.334 for ES2 */
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index aecc053dc10..ca0131a4f65 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -14,6 +14,7 @@
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
+#include <linux/types.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 8da12ea9010..ca00590867c 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -31,6 +31,7 @@
 #include <i2c.h>
 #include <mmc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index fca730212f0..aef42e031fe 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -19,6 +19,7 @@
 #include <spi_flash.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int checkboard(void)
 {
diff --git a/board/renesas/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
index fbef959c52a..3ef56ea34e6 100644
--- a/board/renesas/sh7763rdp/sh7763rdp.c
+++ b/board/renesas/sh7763rdp/sh7763rdp.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define CPU_CMDREG	0xB1000006
 #define PDCR        0xffef0006
diff --git a/board/renesas/silk/qos.c b/board/renesas/silk/qos.c
index 43a29898657..a153673d1b0 100644
--- a/board/renesas/silk/qos.c
+++ b/board/renesas/silk/qos.c
@@ -12,6 +12,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
 /* QoS version 0.11 */
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index c2667bb9c8a..fb672943840 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -33,6 +33,7 @@
 #include <miiphy.h>
 #include <i2c.h>
 #include <div64.h>
+#include <linux/types.h>
 #include "qos.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c
index b80c6b421ab..a43c7e97334 100644
--- a/board/renesas/silk/silk_spl.c
+++ b/board/renesas/silk/silk_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/stout/cpld.c b/board/renesas/stout/cpld.c
index 71a3f5dd39c..27bfcbf2f96 100644
--- a/board/renesas/stout/cpld.c
+++ b/board/renesas/stout/cpld.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "cpld.h"
 
 #define SCLK			(92 + 24)
diff --git a/board/renesas/stout/qos.c b/board/renesas/stout/qos.c
index c2f0b853871..3b09740ac55 100644
--- a/board/renesas/stout/qos.c
+++ b/board/renesas/stout/qos.c
@@ -12,6 +12,7 @@
 #include <asm/mach-types.h>
 #include <asm/io.h>
 #include <asm/arch/rmobile.h>
+#include <asm/types.h>
 
 /* QoS version 0.955 for ES1 and version 0.973 for ES2 */
 #if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index 163137a65c6..a8b4a020c2e 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -15,6 +15,7 @@
 #include <netdev.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c
index 10efd09139f..738443ea380 100644
--- a/board/renesas/stout/stout_spl.c
+++ b/board/renesas/stout/stout_spl.c
@@ -21,6 +21,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/rcar-mstp.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <spl.h>
 
diff --git a/board/renesas/ulcb/cpld.c b/board/renesas/ulcb/cpld.c
index 30f96966b57..e281d491006 100644
--- a/board/renesas/ulcb/cpld.c
+++ b/board/renesas/ulcb/cpld.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <sysreset.h>
 #include <linux/errno.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 0bec9954c36..538dc4ecbab 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index f85209c6498..c1418e4593c 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 static int get_ethaddr_from_eeprom(u8 *addr)
 {
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index fa568f76c66..f715df30a46 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -14,6 +14,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/dwmmc.h>
 #include <asm/arch/power.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index e79f5ddd2c9..fd727330f20 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cros_ec.h>
 #include <env.h>
 #include <errno.h>
@@ -38,6 +39,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 026fc4abf11..50b36c1b440 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -9,7 +9,9 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <power/pmic.h>
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 1783983ab11..f6e0c2020f7 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -29,6 +29,7 @@
 #include <asm/arch/sromc.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/max77686_pmic.h>
 #include <power/regulator.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 30a00892e0c..80a3109823a 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <samsung/misc.h>
 #include <errno.h>
 #include <version.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 183579c4e3e..c4661ad4347 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index e17454ad77d..1e0da03f8b6 100644
--- a/board/samsung/origen/origen.c
+++ b/board/samsung/origen/origen.c
@@ -11,6 +11,7 @@
 #include <asm/arch/periph.h>
 #include <asm/arch/pinmux.h>
 #include <usb.h>
+#include <asm/types.h>
 
 u32 get_board_rev(void)
 {
diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
index 38cfde4f136..35de29370ad 100644
--- a/board/samsung/smdkc100/smdkc100.c
+++ b/board/samsung/smdkc100/smdkc100.c
@@ -15,6 +15,7 @@
 #include <asm/arch/sromc.h>
 #include <netdev.h>
 #include <asm/mach-types.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c
index 58b71df0817..2f921acb0ae 100644
--- a/board/samsung/smdkv310/smdkv310.c
+++ b/board/samsung/smdkv310/smdkv310.c
@@ -17,6 +17,7 @@
 #include <asm/arch/periph.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/sromc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 18f311da979..f7862d9d62d 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -20,6 +20,7 @@
 #include <asm/arch/mipi_dsim.h>
 #include <asm/arch/watchdog.h>
 #include <asm/arch/power.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 6b008943da1..6ea1dfd9819 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -14,6 +14,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
 #include <asm/arch/mipi_dsim.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 15d866abcc7..e511593b4c3 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -18,6 +18,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/watchdog.h>
 #include <ld9040.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index deee7b147df..6fbcc28e221 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -19,6 +19,7 @@
 #include <asm/u-boot-sandbox.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/kernel.h>
 
 /*
  * Pointer to initial global data area
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index 689cd799dd3..6caf53c532b 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -24,6 +24,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sandisk/sansa_fuze_plus/spl_boot.c b/board/sandisk/sansa_fuze_plus/spl_boot.c
index 59464877fbf..9c526865fba 100644
--- a/board/sandisk/sansa_fuze_plus/spl_boot.c
+++ b/board/sandisk/sansa_fuze_plus/spl_boot.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_EMI	(MXS_PAD_1V8 | MXS_PAD_12MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_SSP	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP)
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index a0cfa407694..33005611ed5 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -24,6 +24,7 @@
 #endif
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sbc8548/ddr.c b/board/sbc8548/ddr.c
index 0c96e96d6c4..62eca8a72ad 100644
--- a/board/sbc8548/ddr.c
+++ b/board/sbc8548/ddr.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 7780b53a204..20f3e7d229c 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -29,6 +29,7 @@
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 void local_bus_init(void);
 
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index cc17f80d07d..ad1502c9297 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -26,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/schulercontrol/sc_sps_1/spl_boot.c b/board/schulercontrol/sc_sps_1/spl_boot.c
index a58fde351a1..dbd1833bdd3 100644
--- a/board/schulercontrol/sc_sps_1/spl_boot.c
+++ b/board/schulercontrol/sc_sps_1/spl_boot.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_LED	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
 #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_PULLUP)
diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index e022e057b64..87577514dce 100644
--- a/board/seco/mx6quq7/mx6quq7.c
+++ b/board/seco/mx6quq7/mx6quq7.c
@@ -34,6 +34,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <i2c.h>
+#include <linux/types.h>
 
 #include "../common/mx6.h"
 
diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
index bf7c69ea838..2653fac73c6 100644
--- a/board/seeed/linkit-smart-7688/board.c
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index 433fba067b9..641f0c29ba9 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
@@ -33,6 +34,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/factoryset.h"
 
 #define GPIO_PAD_CTRL \
diff --git a/board/siemens/capricorn/spl.c b/board/siemens/capricorn/spl.c
index d81764832de..115ab4753df 100644
--- a/board/siemens/capricorn/spl.c
+++ b/board/siemens/capricorn/spl.c
@@ -16,6 +16,7 @@
 #include <dm/uclass-internal.h>
 #include <dm/device-internal.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index d60ef4e87cd..dbd09292d00 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  *
+#include <linux/types.h>
  * Read FactorySet information from EEPROM into global structure.
  * (C) Copyright 2013 Siemens Schweiz AG
  */
diff --git a/board/siemens/common/factoryset.h b/board/siemens/common/factoryset.h
index 261a2176879..fb9da221a1b 100644
--- a/board/siemens/common/factoryset.h
+++ b/board/siemens/common/factoryset.h
@@ -7,6 +7,7 @@
 #ifndef __FACTORYSET_H
 #define __FACTORYSET_H
 
+#include <linux/types.h>
 #define MAX_STRING_LENGTH	32
 
 struct factorysetcontainer {
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index fbccbb0f6da..88631131cd9 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -31,6 +31,7 @@
 #include <netdev.h>
 #endif
 #include <spi.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #ifdef CONFIG_USB_GADGET_ATMEL_USBA
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 7fa7d632ae2..159901231c5 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -39,6 +39,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "board.h"
 #include "../common/factoryset.h"
 #include <nand.h>
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 18b397c61d4..55dac4a7b92 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -32,6 +32,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../../../drivers/video/da8xx-fb.h"
 #include <asm/io.h>
 #include <asm/emif.h>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index 7be23e97967..4311877aff3 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -18,6 +18,7 @@
 #include <net.h>
 #include <spi.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/cpu.h>
@@ -36,6 +37,7 @@
 #include <cpsw.h>
 #include <video.h>
 #include <watchdog.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
index 93bcecd6ac9..f85cbad1594 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
diff --git a/board/sifive/fu540/spl.c b/board/sifive/fu540/spl.c
index 4e2662a46c6..06e4680b161 100644
--- a/board/sifive/fu540/spl.c
+++ b/board/sifive/fu540/spl.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/spl.h>
+#include <linux/types.h>
 
 #define GEM_PHY_RESET	SIFIVE_GENERIC_GPIO_NR(0, 12)
 
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index 15c75959e6a..ffea5a53ce2 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -29,6 +29,7 @@
 #include <miiphy.h>
 #include <micrel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <common.h>
 #include <malloc.h>
diff --git a/board/socrates/nand.c b/board/socrates/nand.c
index 3fca5d063ca..c82806b0ef5 100644
--- a/board/socrates/nand.c
+++ b/board/socrates/nand.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SYS_NAND_BASE)
 #include <nand.h>
diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c
index d358a209a4a..4775684dd61 100644
--- a/board/socrates/sdram.c
+++ b/board/socrates/sdram.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
@@ -13,6 +14,7 @@
 #include <asm/mmu.h>
 #include <spd_sdram.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 
 #if !defined(CONFIG_SPD_EEPROM)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 96cde5afcbe..96a59b92697 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -30,6 +30,7 @@
 #include <i2c.h>
 #include <mb862xx.h>
 #include <video_fb.h>
+#include <linux/types.h>
 #include "upm_table.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index d72aee47ca9..74e646ad781 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -6,6 +6,7 @@
  * Author: Christoph Fritz <chf.fritz at googlemail.com>
  */
 
+#include <compiler.h>
 #include <init.h>
 #include <net.h>
 #include <stdio.h>
@@ -34,6 +35,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <usb.h>
diff --git a/board/softing/vining_fpga/qts/pinmux_config.h b/board/softing/vining_fpga/qts/pinmux_config.h
index f73ccbbabee..42c807cebc8 100644
--- a/board/softing/vining_fpga/qts/pinmux_config.h
+++ b/board/softing/vining_fpga/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/softing/vining_fpga/qts/sdram_config.h b/board/softing/vining_fpga/qts/sdram_config.h
index ec067eb473d..22e0e4d5e28 100644
--- a/board/softing/vining_fpga/qts/sdram_config.h
+++ b/board/softing/vining_fpga/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c
index c89c7994d50..a66ef693077 100644
--- a/board/softing/vining_fpga/socfpga.c
+++ b/board/softing/vining_fpga/socfpga.c
@@ -19,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 83e789b99f7..4c762b39c83 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -10,11 +10,13 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/board/solidrun/common/tlv_data.c b/board/solidrun/common/tlv_data.c
index 315faeb6140..ab1106949ec 100644
--- a/board/solidrun/common/tlv_data.c
+++ b/board/solidrun/common/tlv_data.c
@@ -5,7 +5,9 @@
 
 #include <common.h>
 #include <compiler.h>
+#include <stdbool.h>
 #include <tlv_eeprom.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include "tlv_data.h"
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index b523a06b29f..bdb018aecd5 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -17,6 +17,7 @@
 #include <image.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/clock.h>
@@ -43,6 +44,7 @@
 #include <usb.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
index 1fe825182f3..a29c59c2d8d 100644
--- a/board/spear/spear300/spear300.c
+++ b/board/spear/spear300/spear300.c
@@ -10,6 +10,7 @@
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/mach-types.h>
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
index 721b1dd4aa5..06a697b9a40 100644
--- a/board/spear/spear310/spear310.c
+++ b/board/spear/spear310/spear310.c
@@ -11,6 +11,7 @@
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/mach-types.h>
diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
index f726f8fccf0..23fc12cdfa4 100644
--- a/board/spear/spear320/spear320.c
+++ b/board/spear/spear320/spear320.c
@@ -11,6 +11,7 @@
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/mach-types.h>
diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
index 0c01f1fbf9e..101c8f15c09 100644
--- a/board/spear/spear600/spear600.c
+++ b/board/spear/spear600/spear600.c
@@ -10,6 +10,7 @@
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/mach-types.h>
diff --git a/board/spear/x600/fpga.c b/board/spear/x600/fpga.c
index 5140694b9e8..f8f3581c730 100644
--- a/board/spear/x600/fpga.c
+++ b/board/spear/x600/fpga.c
@@ -12,6 +12,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_misc.h>
 #include <asm/arch/spr_ssp.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /*
diff --git a/board/sr1500/qts/pinmux_config.h b/board/sr1500/qts/pinmux_config.h
index a8b8dbadeff..65857d10a1b 100644
--- a/board/sr1500/qts/pinmux_config.h
+++ b/board/sr1500/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/sr1500/qts/sdram_config.h b/board/sr1500/qts/sdram_config.h
index d25354bb49c..711a71ba9b3 100644
--- a/board/sr1500/qts/sdram_config.h
+++ b/board/sr1500/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index 21d21dafd8e..faf90a30efd 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <compiler.h>
 #include <dfu.h>
 #include <env.h>
 #include <memalign.h>
@@ -15,6 +16,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/stm32prog.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
diff --git a/board/st/common/stpmic1.c b/board/st/common/stpmic1.c
index 7aa85851738..d7c8890eb3f 100644
--- a/board/st/common/stpmic1.c
+++ b/board/st/common/stpmic1.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/pmic.h>
diff --git a/board/st/common/stpmic1.h b/board/st/common/stpmic1.h
index b17d6f16338..6d172aae467 100644
--- a/board/st/common/stpmic1.h
+++ b/board/st/common/stpmic1.h
@@ -3,4 +3,5 @@
  * Copyright (C) 2020, STMicroelectronics - All Rights Reserved
  */
 
+#include <asm/types.h>
 void stpmic1_init(u32 voltage_mv);
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 205979d96f1..b0be9663dd9 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -19,6 +19,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.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 396cc61a458..393fe404c74 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index b70fd39ff30..54242d9a971 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index cf553ff5b6a..e1625f88a5b 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -27,6 +27,7 @@
 #include <asm/gpio.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index ec87fc3e5ef..ad55fe3b871 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index ec87fc3e5ef..ad55fe3b871 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 
diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c
index a6a41780c96..d6c8bddad85 100644
--- a/board/st/stm32mp1/spl.c
+++ b/board/st/stm32mp1/spl.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include "../common/stpmic1.h"
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 0938906fcb1..ad9fb68cd2d 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -26,6 +26,7 @@
 #include <phy.h>
 #include <remoteproc.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <usb.h>
@@ -46,6 +47,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <usb/dwc2_udc.h>
 
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index bd2d56d6d59..8e44c8e2ad7 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -18,6 +18,7 @@
 #include <netdev.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <dm/platform_data/serial_pl01x.h>
 
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index f49984238f1..fb547d30455 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -36,6 +36,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #ifndef CONFIG_ARM64
 #include <asm/armv7.h>
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index 8faaf8045c1..7fb1ff2722e 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
 #include <init.h>
@@ -11,6 +12,7 @@
 #include <stdio.h>
 #include <asm/arcregs.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 #include "axs10x.h"
 #include <asm/cache.h>
 
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index 995514eab58..db9d2514389 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -14,6 +14,7 @@
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arcregs.h>
 
diff --git a/board/synopsys/hsdk/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index 295e80afe72..d8da3ceed3f 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -11,6 +11,7 @@
 #include <dm/device.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include "clk-lib.h"
 
diff --git a/board/synopsys/hsdk/clk-lib.h b/board/synopsys/hsdk/clk-lib.h
index 970bcd4a17e..3d48ac5485f 100644
--- a/board/synopsys/hsdk/clk-lib.h
+++ b/board/synopsys/hsdk/clk-lib.h
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 enum clk_ctl_ops {
 	CLK_SET		= BIT(0), /* set frequency */
diff --git a/board/synopsys/hsdk/env-lib.h b/board/synopsys/hsdk/env-lib.h
index b745442775c..545a19a0552 100644
--- a/board/synopsys/hsdk/env-lib.h
+++ b/board/synopsys/hsdk/env-lib.h
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <config.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 enum env_type {
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 0812126a98d..9b21315eedb 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <env.h>
@@ -13,6 +14,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -29,6 +31,7 @@
 #include <malloc.h>
 #include <usb.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "clk-lib.h"
 #include "env-lib.h"
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 50af75fb7e2..96b01e7ff1e 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
+#include <linux/types.h>
 
 #include <asm/arcregs.h>
 
diff --git a/board/sysam/amcore/amcore.c b/board/sysam/amcore/amcore.c
index 183a78d9ed7..4936f6d9daa 100644
--- a/board/sysam/amcore/amcore.c
+++ b/board/sysam/amcore/amcore.c
@@ -14,6 +14,7 @@
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/platform_data/serial_coldfire.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/sysam/stmark2/stmark2.c b/board/sysam/stmark2/stmark2.c
index 4c75bd6a5be..d17bd83e020 100644
--- a/board/sysam/stmark2/stmark2.c
+++ b/board/sysam/stmark2/stmark2.c
@@ -14,6 +14,7 @@
 #include <asm/immap.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index 5871e68bfb1..26ea977878c 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  (PAD_CTL_PUS_100K_UP |			\
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 7adaea5d587..0f846e1eb24 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -32,6 +32,7 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include <power/tps65217.h>
 #include <power/tps65910.h>
 #include <env_internal.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index 24e8376d786..05ff535cbfe 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -30,6 +30,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <phy.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index dd5e154e671..32f7fa24e63 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -26,6 +26,7 @@
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_BUILD)
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 5ba16bcba58..0793efd80ef 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c
index 55d19728af3..989c6919e7a 100644
--- a/board/technexion/pico-imx6ul/spl.c
+++ b/board/technexion/pico-imx6ul/spl.c
@@ -21,6 +21,7 @@
 #include <linux/libfdt.h>
 #include <spl.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_BUILD)
 
diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
index 50604f196f2..811e84de968 100644
--- a/board/technexion/pico-imx7d/spl.c
+++ b/board/technexion/pico-imx7d/spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
@@ -21,6 +22,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_BUILD)
 
diff --git a/board/technexion/pico-imx8mq/spl.c b/board/technexion/pico-imx8mq/spl.c
index e2d557732f6..f5ed05f234e 100644
--- a/board/technexion/pico-imx8mq/spl.c
+++ b/board/technexion/pico-imx8mq/spl.c
@@ -25,6 +25,7 @@
 #include <spl.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "lpddr4_timing.h"
 
diff --git a/board/technologic/ts4600/iomux.c b/board/technologic/ts4600/iomux.c
index 5ef69154254..0ba85499142 100644
--- a/board/technologic/ts4600/iomux.c
+++ b/board/technologic/ts4600/iomux.c
@@ -20,6 +20,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	MUX_CONFIG_SSP0	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index c2a28ccf63b..72e3091c1b8 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -29,6 +29,7 @@
 #include <fsl_esdhc_imx.h>
 #include <mc13892.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <malloc.h>
 #include <netdev.h>
diff --git a/board/technologic/ts4800/ts4800.h b/board/technologic/ts4800/ts4800.h
index 25644f523ac..df3813e363b 100644
--- a/board/technologic/ts4800/ts4800.h
+++ b/board/technologic/ts4800/ts4800.h
@@ -6,6 +6,7 @@
 #ifndef _TS4800_H
 #define _TS4800_H
 
+#include <asm/types.h>
 #define TS4800_SYSCON_BASE 0xb0010000
 
 struct ts4800_wtd_regs {
diff --git a/board/terasic/de0-nano-soc/qts/pinmux_config.h b/board/terasic/de0-nano-soc/qts/pinmux_config.h
index 3058ee3a594..f9fb07b5e05 100644
--- a/board/terasic/de0-nano-soc/qts/pinmux_config.h
+++ b/board/terasic/de0-nano-soc/qts/pinmux_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
 /* pin MUX configuration data */
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/terasic/de0-nano-soc/qts/sdram_config.h b/board/terasic/de0-nano-soc/qts/sdram_config.h
index 0504dd688f9..b9363d87e68 100644
--- a/board/terasic/de0-nano-soc/qts/sdram_config.h
+++ b/board/terasic/de0-nano-soc/qts/sdram_config.h
@@ -5,6 +5,7 @@
 #ifndef __SDRAM_CONFIG_H
 #define __SDRAM_CONFIG_H
 
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMTYPE			2
 #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMBL			8
 #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ADDRORDER		0
diff --git a/board/terasic/de1-soc/qts/pinmux_config.h b/board/terasic/de1-soc/qts/pinmux_config.h
index c75635005cc..f5bf0567b00 100644
--- a/board/terasic/de1-soc/qts/pinmux_config.h
+++ b/board/terasic/de1-soc/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/terasic/de1-soc/qts/sdram_config.h b/board/terasic/de1-soc/qts/sdram_config.h
index c60426f2ff6..550bd50f7a6 100644
--- a/board/terasic/de1-soc/qts/sdram_config.h
+++ b/board/terasic/de1-soc/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/terasic/de1-soc/socfpga.c b/board/terasic/de1-soc/socfpga.c
index 22fbee40aba..2e516ed53be 100644
--- a/board/terasic/de1-soc/socfpga.c
+++ b/board/terasic/de1-soc/socfpga.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <spl.h>
+#include <asm/types.h>
 
 void board_boot_order(u32 *spl_boot_list)
 {
diff --git a/board/terasic/de10-nano/qts/pinmux_config.h b/board/terasic/de10-nano/qts/pinmux_config.h
index 6a9c4150296..ca5b3e746a6 100644
--- a/board/terasic/de10-nano/qts/pinmux_config.h
+++ b/board/terasic/de10-nano/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/terasic/de10-nano/qts/sdram_config.h b/board/terasic/de10-nano/qts/sdram_config.h
index 26910ef348b..2fa5e537b1a 100644
--- a/board/terasic/de10-nano/qts/sdram_config.h
+++ b/board/terasic/de10-nano/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/terasic/sockit/qts/pinmux_config.h b/board/terasic/sockit/qts/pinmux_config.h
index f8e458f3dd4..896358352d0 100644
--- a/board/terasic/sockit/qts/pinmux_config.h
+++ b/board/terasic/sockit/qts/pinmux_config.h
@@ -6,6 +6,7 @@
 #ifndef __SOCFPGA_PINMUX_CONFIG_H__
 #define __SOCFPGA_PINMUX_CONFIG_H__
 
+#include <asm/types.h>
 const u8 sys_mgr_init_table[] = {
 	0, /* EMACIO0 */
 	2, /* EMACIO1 */
diff --git a/board/terasic/sockit/qts/sdram_config.h b/board/terasic/sockit/qts/sdram_config.h
index 96cc3570341..e5965d734b1 100644
--- a/board/terasic/sockit/qts/sdram_config.h
+++ b/board/terasic/sockit/qts/sdram_config.h
@@ -7,6 +7,7 @@
 #define __SOCFPGA_SDRAM_CONFIG_H__
 
 /* SDRAM configuration */
+#include <asm/types.h>
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRDWR_CPORTRDWR		0x5A56A
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTRMAP_CPORTRMAP		0xB00088
 #define CONFIG_HPS_SDR_CTRLCFG_CPORTWIDTH_CPORTWIDTH		0x44555
diff --git a/board/theadorable/fpga.c b/board/theadorable/fpga.c
index 5a34244ea05..6e12e4f9c08 100644
--- a/board/theadorable/fpga.c
+++ b/board/theadorable/fpga.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "theadorable.h"
 
 /*
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 2f3df520928..909bc6f39ba 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -27,6 +27,7 @@
 #ifdef CONFIG_NET
 #include <netdev.h>
 #endif
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include "theadorable.h"
 
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 7edfd2a2b92..71bfb3677bf 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -12,6 +12,7 @@
 #include <spl.h>
 #include <syscon.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include <u-boot/crc.h>
 #include <usb.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 21f90e0e7e8..13c84de23b9 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -45,6 +45,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/tps65217.h>
 #include <power/tps65910.h>
 #include <env_internal.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index e3e13421cd3..8d2652dfcdc 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <eeprom.h>
 #include <image.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
@@ -32,6 +33,7 @@
 #include <asm/omap_common.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/board_detect.h"
 #include "board.h"
 #include <power/pmic.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 4458ddec325..62d1265643a 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -17,6 +17,7 @@
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <usb.h>
 #include <errno.h>
@@ -39,6 +40,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/gadget.h>
 #include <dwc3-uboot.h>
 #include <dwc3-omap-uboot.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index c34726ac983..f9a0f795989 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -28,6 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/board_detect.h"
 
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 15b0d5149f8..331bb6e2279 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -39,6 +39,7 @@
 #include <asm/omap_musb.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 18b8a967106..1687997abac 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -8,9 +8,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <eeprom.h>
 #include <log.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/hardware.h>
@@ -25,6 +27,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "board_detect.h"
 
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
index a74b9468bca..20d3f3d9098 100644
--- a/board/ti/common/board_detect.h
+++ b/board/ti/common/board_detect.h
@@ -9,7 +9,9 @@
 #define __BOARD_DETECT_H
 
 /* TI EEPROM MAGIC Header identifier */
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #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 baf47edc304..956de9d619c 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -27,6 +27,7 @@
 #include <linux/string.h>
 #include <asm/gpio.h>
 #include <usb.h>
+#include <linux/types.h>
 #include <linux/usb/gadget.h>
 #include <asm/omap_common.h>
 #include <asm/omap_sec_common.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 2716c4d4c08..85d9b3397a1 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -30,6 +30,7 @@
 #include <twl4030.h>
 #include <asm/mach-types.h>
 #include <asm/omap_musb.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/mtd/rawnand.h>
diff --git a/board/ti/evm/evm.h b/board/ti/evm/evm.h
index 09b08b490ae..a9542c92299 100644
--- a/board/ti/evm/evm.h
+++ b/board/ti/evm/evm.h
@@ -6,6 +6,7 @@
 #ifndef _EVM_H_
 #define _EVM_H_
 
+#include <asm/types.h>
 const omap3_sysinfo sysinfo = {
 	DDR_DISCRETE,
 	"OMAP3 EVM board",
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 81810f50a06..a4b0c1a2b21 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -14,6 +14,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/arch/sys_proto.h>
@@ -30,6 +31,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "../common/board_detect.h"
 
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 449073b6b7a..de120c48dcf 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -7,12 +7,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "board.h"
 #include <env.h>
 #include <hang.h>
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index b5258b66e10..8d0032e55ca 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -12,6 +12,7 @@
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 unsigned int get_external_clk(u32 clk)
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index eb115a818f4..23c6e93ab5f 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -24,6 +24,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 6a9935c7ef5..3648db6af0c 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 unsigned int external_clk[ext_clk_count] = {
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index 459530ecb9d..2d9da4e3a7d 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -12,6 +12,7 @@
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 unsigned int get_external_clk(u32 clk)
diff --git a/board/ti/ks2_evm/ddr3_k2e.c b/board/ti/ks2_evm/ddr3_k2e.c
index 85e70fc6776..b1065f53d30 100644
--- a/board/ti/ks2_evm/ddr3_k2e.c
+++ b/board/ti/ks2_evm/ddr3_k2e.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include "ddr3_cfg.h"
 #include <asm/arch/ddr3.h>
 
diff --git a/board/ti/ks2_evm/ddr3_k2g.c b/board/ti/ks2_evm/ddr3_k2g.c
index 563c5e9950c..a8a306d61cc 100644
--- a/board/ti/ks2_evm/ddr3_k2g.c
+++ b/board/ti/ks2_evm/ddr3_k2g.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include "ddr3_cfg.h"
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
diff --git a/board/ti/ks2_evm/ddr3_k2hk.c b/board/ti/ks2_evm/ddr3_k2hk.c
index 03bae4bf91e..eee64753bb9 100644
--- a/board/ti/ks2_evm/ddr3_k2hk.c
+++ b/board/ti/ks2_evm/ddr3_k2hk.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include "ddr3_cfg.h"
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
diff --git a/board/ti/ks2_evm/ddr3_k2l.c b/board/ti/ks2_evm/ddr3_k2l.c
index 36babcc5e11..62daa49d32e 100644
--- a/board/ti/ks2_evm/ddr3_k2l.c
+++ b/board/ti/ks2_evm/ddr3_k2l.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include "ddr3_cfg.h"
 #include <asm/arch/ddr3.h>
 
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index dd9217f0fba..0d551b1b4e9 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -17,6 +17,7 @@
 #include <tca642x.h>
 #include <usb.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index c36690eec17..0a64a309822 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -18,6 +18,7 @@
 #include <asm/gpio.h>
 #include <env.h>
 #include <twl6030.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "panda_mux_data.h"
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index fe12d6e8913..ed9b50cc700 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #include "sdp4430_mux_data.h"
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index 2689e48c8ce..8cc91def5e4 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -24,6 +24,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/timll/devkit3250/devkit3250_spl.c b/board/timll/devkit3250/devkit3250_spl.c
index 47af78ae0b1..327103087fb 100644
--- a/board/timll/devkit3250/devkit3250_spl.c
+++ b/board/timll/devkit3250/devkit3250_spl.c
@@ -12,6 +12,7 @@
 #include <asm/arch/emc.h>
 #include <asm/arch-lpc32xx/gpio.h>
 #include <spl.h>
+#include <asm/types.h>
 
 static struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
 
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 4c05c9a8b7f..f9b35733f50 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -31,6 +31,7 @@
 #include <asm/arch/mem.h>
 #include <asm/mach-types.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "devkit8000.h"
 #include <asm/gpio.h>
 #ifdef CONFIG_DRIVER_DM9000
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index cae2b789bc7..0789e836225 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 023c93c0929..eebba48f015 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -16,6 +16,7 @@
 #include <asm/arch/pinmux.h>
 #include <env_internal.h>
 #include <pci_tegra.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/toradex/apalis-tk1/as3722_init.c b/board/toradex/apalis-tk1/as3722_init.c
index 68169f55480..dea80ed4a8a 100644
--- a/board/toradex/apalis-tk1/as3722_init.c
+++ b/board/toradex/apalis-tk1/as3722_init.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
 #include <linux/delay.h>
+#include <linux/types.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 6b319c043a6..b075b620585 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -20,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <ahci.h>
 #include <asm/arch/clock.h>
diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c
index 9247a780544..5961d6179d2 100644
--- a/board/toradex/apalis_imx6/pf0100.c
+++ b/board/toradex/apalis_imx6/pf0100.c
@@ -18,6 +18,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pf0100_otp.inc"
 #include "pf0100.h"
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index 49fb5d7a370..7fefc2fd1c4 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -18,6 +18,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <pci_tegra.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 1a2a23337cf..b9df96df053 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 99342e820e9..6b001c5450d 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -20,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index d1bd0566b2a..31e4620edb3 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -18,6 +18,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pf0100_otp.inc"
 #include "pf0100.h"
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 7bb691350be..9d802277b47 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -32,6 +32,7 @@
 #include <miiphy.h>
 #include <mtd_node.h>
 #include <netdev.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/rn5t567_pmic.h>
 #include <usb.h>
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index f809260aa21..b4f32a33545 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <i2c.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include "../common/tdx-common.h"
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 6361ffedb1f..9b966da7429 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index ff52ddffb19..8442aba8751 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tdx-cfg-block.h"
 #include <command.h>
 #include <asm/cache.h>
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index c04a888f935..0fa75352abe 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index bce63c0574d..8f6d77f206a 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -27,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/bd71837.h>
 #include <power/pmic.h>
 #include <spl.h>
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 9134d6bf6d4..9124ec7964a 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index 92bda607652..c2d8e276546 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 <asm/types.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 98a04ff9067..1515b03f2da 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -20,6 +20,7 @@
 #include <flash.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.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 1b2855c9896..4681690d7f3 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -7,6 +7,7 @@
  * Author: Markus Niebel <markus.niebel at tq-group.com>
  */
 
+#include <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <vsprintf.h>
@@ -30,6 +31,7 @@
 #include <linux/libfdt.h>
 #include <i2c.h>
 #include <mmc.h>
+#include <linux/types.h>
 #include <power/pfuze100_pmic.h>
 #include <power/pmic.h>
 #include <spi_flash.h>
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 4c004a75553..a263843f4aa 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -37,6 +37,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include <malloc.h>
diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
index c0cd357845e..37bbd497bab 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -29,6 +29,7 @@
 #include <micrel.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index 9ef9db18cd0..6b865a6147d 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_BUILD)
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/variscite/dart_6ul/spl.c b/board/variscite/dart_6ul/spl.c
index bf4c6bd573e..0efa57b8543 100644
--- a/board/variscite/dart_6ul/spl.c
+++ b/board/variscite/dart_6ul/spl.c
@@ -17,6 +17,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |		\
 	PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |		\
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index d285b0f36cd..ec850a8c1de 100644
--- a/board/varisys/common/sys_eeprom.c
+++ b/board/varisys/common/sys_eeprom.c
@@ -12,10 +12,12 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <i2c.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index a7721274aed..c7b17a9caf2 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <netdev.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
index 48b5058e7b4..4aaf145ecab 100644
--- a/board/varisys/cyrus/ddr.c
+++ b/board/varisys/cyrus/ddr.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c
index 34422424bee..b034550f615 100644
--- a/board/ve8313/ve8313.c
+++ b/board/ve8313/ve8313.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index a7ba5393183..e4c742a98cb 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -37,6 +37,7 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/tps65910.h>
 #include <watchdog.h>
 #include "board.h"
diff --git a/board/vscom/baltos/board.h b/board/vscom/baltos/board.h
index 630c9bba73b..93768571bb2 100644
--- a/board/vscom/baltos/board.h
+++ b/board/vscom/baltos/board.h
@@ -10,6 +10,7 @@
 #ifndef _BOARD_H_
 #define _BOARD_H_
 
+#include <linux/types.h>
 typedef struct _BSP_VS_HWPARAM    // v1.0
 {
 	uint32_t Magic;
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index e6ba3561217..7c0680bfa47 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
+#include <linux/types.h>
 
 #include <asm/arch/mx6-ddr.h>
 /*
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 3a883d5019a..d170f01a58b 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
@@ -38,6 +39,7 @@
 #include <phy.h>
 #include <i2c.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 
diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c
index 53d5d3c5a83..77fa813600b 100644
--- a/board/work-microwave/work_92105/work_92105_display.c
+++ b/board/work-microwave/work_92105/work_92105_display.c
@@ -25,6 +25,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * GPO 15 in port 3 is gpio 3*32+15 = 111
diff --git a/board/work-microwave/work_92105/work_92105_spl.c b/board/work-microwave/work_92105/work_92105_spl.c
index a31553a2d25..69a324bb288 100644
--- a/board/work-microwave/work_92105/work_92105_spl.c
+++ b/board/work-microwave/work_92105/work_92105_spl.c
@@ -13,6 +13,7 @@
 #include <asm/arch/emc.h>
 #include <asm/gpio.h>
 #include <spl.h>
+#include <asm/types.h>
 #include "work_92105_display.h"
 
 struct emc_dram_settings dram_64mb = {
diff --git a/board/xes/common/actl_nand.c b/board/xes/common/actl_nand.c
index 4e52838c909..2ae209eb7aa 100644
--- a/board/xes/common/actl_nand.c
+++ b/board/xes/common/actl_nand.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /*
  * Hardware specific access to control-lines
diff --git a/board/xes/common/fsl_8xxx_clk.c b/board/xes/common/fsl_8xxx_clk.c
index abd86694f30..2d27301d7c8 100644
--- a/board/xes/common/fsl_8xxx_clk.c
+++ b/board/xes/common/fsl_8xxx_clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /*
  * Return SYSCLK input frequency - 50 MHz or 66 MHz depending on POR config
diff --git a/board/xes/common/fsl_8xxx_misc.c b/board/xes/common/fsl_8xxx_misc.c
index fe6858e0d29..28a31c0dec7 100644
--- a/board/xes/common/fsl_8xxx_misc.c
+++ b/board/xes/common/fsl_8xxx_misc.c
@@ -21,6 +21,7 @@ int board_flash_wp_on(void)
 	return 0;
 }
 #endif
+#include <linux/types.h>
 
 /*
  * Return a board's derivative model number.  For example:
diff --git a/board/xes/common/fsl_8xxx_misc.h b/board/xes/common/fsl_8xxx_misc.h
index 6e4858f15c3..2bcc765726b 100644
--- a/board/xes/common/fsl_8xxx_misc.h
+++ b/board/xes/common/fsl_8xxx_misc.h
@@ -6,6 +6,7 @@
 #ifndef __FSL_8XXX_MISC_H___
 #define __FSL_8XXX_MISC_H___
 
+#include <linux/types.h>
 uint get_board_derivative(void);
 
 #endif /* __FSL_8XXX_MISC_H__ */
diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c
index 6c6db6c2fcf..d3190c7ae3d 100644
--- a/board/xes/common/fsl_8xxx_pci.c
+++ b/board/xes/common/fsl_8xxx_pci.c
@@ -15,6 +15,7 @@
 #include <linux/compiler.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
+#include <linux/types.h>
 
 
 #ifdef CONFIG_PCI1
diff --git a/board/xes/xpedite517x/ddr.c b/board/xes/xpedite517x/ddr.c
index 2be421efd51..4a568133081 100644
--- a/board/xes/xpedite517x/ddr.c
+++ b/board/xes/xpedite517x/ddr.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address)
 {
diff --git a/board/xes/xpedite520x/ddr.c b/board/xes/xpedite520x/ddr.c
index c142bec406e..e96dc89fda9 100644
--- a/board/xes/xpedite520x/ddr.c
+++ b/board/xes/xpedite520x/ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/xes/xpedite537x/ddr.c b/board/xes/xpedite537x/ddr.c
index 90498fb7045..2accc90e9fa 100644
--- a/board/xes/xpedite537x/ddr.c
+++ b/board/xes/xpedite537x/ddr.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/xes/xpedite550x/ddr.c b/board/xes/xpedite550x/ddr.c
index 419b25d6ad4..6c37becadea 100644
--- a/board/xes/xpedite550x/ddr.c
+++ b/board/xes/xpedite550x/ddr.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
+#include <linux/types.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 19de01caf0c..79b8f2f0136 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include "board.h"
 
 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 7e21ffc1958..e5e23ebd1f2 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index d58e5fc53c0..a465c2f57f4 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -25,6 +25,7 @@
 #include <versalpl.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/xilinx/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c
index 332500bdc72..5decf572fc0 100644
--- a/board/xilinx/zynq/bootimg.c
+++ b/board/xilinx/zynq/bootimg.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include <u-boot/md5.h>
 #include <zynq_bootimg.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 04afdb693e8..e0aead98bba 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -17,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/md5.h>
 #include <u-boot/rsa.h>
 #include <u-boot/rsa-mod-exp.h>
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index 52498147aef..a4d4d72c2b4 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc,
 				   char *const argv[])
diff --git a/board/xilinx/zynqmp/pm_cfg_obj.h b/board/xilinx/zynqmp/pm_cfg_obj.h
index 86e785490ce..acbad46b532 100644
--- a/board/xilinx/zynqmp/pm_cfg_obj.h
+++ b/board/xilinx/zynqmp/pm_cfg_obj.h
@@ -5,5 +5,6 @@
  * Declaration of PMU config object binary blob linked in at build time.
  */
 
+#include <asm/types.h>
 extern const u32 zynqmp_pm_cfg_obj[];
 extern const int zynqmp_pm_cfg_obj_size;
diff --git a/board/xilinx/zynqmp/tap_delays.c b/board/xilinx/zynqmp/tap_delays.c
index 5fde0aed7db..041521c6dad 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 <asm/types.h>
 #include <linux/delay.h>
 
 #define SD_DLL_CTRL			0xFF180358
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 91eb35436b6..6e22c209063 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -16,6 +16,7 @@
 #include <ahci.h>
 #include <scsi.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <wdt.h>
@@ -41,6 +42,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "../common/board.h"
 
 #include "pm_cfg_obj.h"
diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c
index ad36ee23471..391ef07afe4 100644
--- a/board/zyxel/nsa310s/nsa310s.c
+++ b/board/zyxel/nsa310s/nsa310s.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include "nsa310s.h"
 
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 3c6de9a8e80..1b1a4b3a262 100644
--- a/cmd/abootimg.c
+++ b/cmd/abootimg.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define abootimg_addr() \
 	(_abootimg_addr == -1 ? image_load_addr : _abootimg_addr)
diff --git a/cmd/acpi.c b/cmd/acpi.c
index c47cfdfd95b..93c3f8f7a11 100644
--- a/cmd/acpi.c
+++ b/cmd/acpi.c
@@ -16,6 +16,7 @@
 #include <dm/acpi.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/adtimg.c b/cmd/adtimg.c
index ea6230ba1f0..f3728aa386d 100644
--- a/cmd/adtimg.c
+++ b/cmd/adtimg.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define OPT_INDEX	"--index"
 
diff --git a/cmd/aes.c b/cmd/aes.c
index b4a3dcc74c6..24d97a75882 100644
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -15,6 +15,7 @@
 #include <mapmem.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 u32 aes_get_key_len(char *command)
 {
diff --git a/cmd/armflash.c b/cmd/armflash.c
index e76838c55c2..8436980125f 100644
--- a/cmd/armflash.c
+++ b/cmd/armflash.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MAX_REGIONS 4
 #define MAX_IMAGES 32
diff --git a/cmd/avb.c b/cmd/avb.c
index 08711e3240a..7434b4b0d69 100644
--- a/cmd/avb.c
+++ b/cmd/avb.c
@@ -11,10 +11,12 @@
 #include <image.h>
 #include <malloc.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define AVB_BOOTARGS	"avb_bootargs"
 static struct AvbOps *avb_ops;
diff --git a/cmd/axi.c b/cmd/axi.c
index 8a3a5f68669..8d268ad6105 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -20,6 +20,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Currently selected AXI bus device */
 static struct udevice *axi_cur_bus;
diff --git a/cmd/bcb.c b/cmd/bcb.c
index e95111796c7..f6be4fa357b 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum bcb_cmd {
 	BCB_CMD_LOAD,
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index a1b3f4be9b2..afeaba5ddc4 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <net.h>
 #include <stdio.h>
@@ -16,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index 87296e2db05..e252460b5f0 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -15,6 +15,7 @@
 #include <bedbug/bedbug.h>
 #include <bedbug/regs.h>
 #include <bedbug/ppc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/binop.c b/cmd/binop.c
index 9fde726b5cb..9710f9569e9 100644
--- a/cmd/binop.c
+++ b/cmd/binop.c
@@ -10,6 +10,7 @@
 #include <vsprintf.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum {
 	OP_ID_XOR,
diff --git a/cmd/blk_common.c b/cmd/blk_common.c
index 4bf7a582b52..9f6b936d9e3 100644
--- a/cmd/blk_common.c
+++ b/cmd/blk_common.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int blk_common_cmd(int argc, char *const argv[], enum if_type if_type,
 		   int *cur_devnump)
diff --git a/cmd/blob.c b/cmd/blob.c
index d4ee6966e97..27878e99639 100644
--- a/cmd/blob.c
+++ b/cmd/blob.c
@@ -6,11 +6,13 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <vsprintf.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * blob_decap() - Decapsulate the data as a blob
diff --git a/cmd/bmp.c b/cmd/bmp.c
index d2ea39ed67a..0c2f916be14 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -19,12 +19,14 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <splash.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <video.h>
 #include <vsprintf.h>
 #include <asm/byteorder.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int bmp_info (ulong addr);
 
diff --git a/cmd/boot.c b/cmd/boot.c
index 8b079b31714..179ddc6a1e8 100644
--- a/cmd/boot.c
+++ b/cmd/boot.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_CMD_GO
 
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 05ff48dc5f1..ce9a1f53e9c 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -28,6 +28,7 @@
 #include <asm-generic/sections.h>
 #include <linux/linkage.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/booti.c b/cmd/booti.c
index 405152c80eb..baf7d7f80b6 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 /*
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 2189593b589..6351b4e659c 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -25,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/zlib.h>
 #include <mapmem.h>
 
diff --git a/cmd/bootstage.c b/cmd/bootstage.c
index 3649e749cd9..c0783bcb478 100644
--- a/cmd/bootstage.c
+++ b/cmd/bootstage.c
@@ -10,6 +10,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc,
 			       char *const argv[])
diff --git a/cmd/bootz.c b/cmd/bootz.c
index 534113695c1..b4cf1eb83d0 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <command.h>
+#include <compiler.h>
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
@@ -15,6 +16,7 @@
 #include <vsprintf.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 int __weak bootz_setup(ulong image, ulong *start, ulong *end)
 {
diff --git a/cmd/cache.c b/cmd/cache.c
index 19890c2566c..fab3091bd2d 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
 #include <linux/compiler.h>
diff --git a/cmd/cbfs.c b/cmd/cbfs.c
index 8f7a10751f7..a0a0e6b107a 100644
--- a/cmd/cbfs.c
+++ b/cmd/cbfs.c
@@ -12,6 +12,7 @@
 #include <cbfs.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
diff --git a/cmd/clk.c b/cmd/clk.c
index a2bfce12aed..d51b987dde5 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -12,7 +12,9 @@
 #include <dm/device-internal.h>
 #include <linux/clk-provider.h>
 #endif
+#include <compiler.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #if defined(CONFIG_DM) && defined(CONFIG_CLK)
diff --git a/cmd/cpu.c b/cmd/cpu.c
index a4b1ee5b577..cd502ef528c 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -11,6 +11,7 @@
 #include <display_options.h>
 #include <dm.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/cmd/cramfs.c b/cmd/cramfs.c
index b34a4dde079..46071763771 100644
--- a/cmd/cramfs.c
+++ b/cmd/cramfs.c
@@ -24,6 +24,7 @@
 #include <jffs2/load_kernel.h>
 #include <cramfs/cramfs_fs.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /* enable/disable debugging messages */
 #define	DEBUG_CRAMFS
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index 7f089d7644f..8e0f63eadb4 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -18,6 +18,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Note: depends on enum ec_current_image */
 static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"};
diff --git a/cmd/demo.c b/cmd/demo.c
index a9dfb609514..f050ff2c727 100644
--- a/cmd/demo.c
+++ b/cmd/demo.c
@@ -14,6 +14,7 @@
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct udevice *demo_dev;
 
diff --git a/cmd/disk.c b/cmd/disk.c
index fcb19ee02e4..80a23385b19 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -12,6 +12,7 @@
 #include <part.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
 		    char *const argv[])
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index d5b1ae536bb..49e35e678cc 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <command.h>
 #include <eeprom.h>
@@ -30,6 +31,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef	CONFIG_SYS_I2C_SPEED
 #define	CONFIG_SYS_I2C_SPEED	50000
diff --git a/cmd/efi.c b/cmd/efi.c
index dd48101ae89..fba91a3d935 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -11,11 +11,13 @@
 #include <log.h>
 #include <malloc.h>
 #include <sort.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const char *const type_name[] = {
 	"reserved",
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index f207e71b09e..d75b88296f9 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -20,6 +20,7 @@
 #include <linux/ctype.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BS systab.boottime
 
diff --git a/cmd/elf.c b/cmd/elf.c
index 325fb19d8fc..2fc1977cad6 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Allow ports to override the default behavior */
 static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 0a6cfe45309..aa1710d4ee2 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -19,6 +19,7 @@
 #include <linux/printk.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 static int do_fastboot_udp(int argc, char *const argv[],
 			   uintptr_t buf_addr, size_t buf_size)
diff --git a/cmd/fat.c b/cmd/fat.c
index e3bee99ec9b..b916b99c797 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
+#include <linux/types.h>
 
 int do_fat_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
diff --git a/cmd/flash.c b/cmd/flash.c
index 56995822cb7..8d70c4d9a9d 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -14,6 +14,7 @@
 #include <uuid.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_MTDPARTS)
 #include <jffs2/jffs2.h>
diff --git a/cmd/fpga.c b/cmd/fpga.c
index d7e20a622d2..31630c2701c 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -20,6 +20,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static long do_fpga_get_device(char *arg)
 {
diff --git a/cmd/fpgad.c b/cmd/fpgad.c
index 96901b684a6..77be4e1e767 100644
--- a/cmd/fpgad.c
+++ b/cmd/fpgad.c
@@ -13,6 +13,7 @@
 #include <console.h>
 #include <display_options.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 #include <gdsys_fpga.h>
 
diff --git a/cmd/fuse.c b/cmd/fuse.c
index b75676e641e..50f0d25e1e1 100644
--- a/cmd/fuse.c
+++ b/cmd/fuse.c
@@ -14,6 +14,7 @@
 #include <fuse.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 570c17d5bac..b614c75e2b5 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -8,10 +8,12 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <errno.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/gpio.h>
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 11ad5f7de46..7f60bf6f1f5 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -19,6 +19,7 @@
 #include <part.h>
 #include <part_efi.h>
 #include <exports.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <uuid.h>
 #include <vsprintf.h>
@@ -31,6 +32,7 @@
 #include <linux/sizes.h>
 #include <stdlib.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static LIST_HEAD(disk_partitions);
 
diff --git a/cmd/i2c.c b/cmd/i2c.c
index f21ed9ee354..5735ea3fdd4 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -68,6 +68,7 @@
 #include <bootretry.h>
 #include <cli.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h>
 #include <dm.h>
 #include <edid.h>
@@ -83,6 +84,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 /* Display values from last command.
diff --git a/cmd/ini.c b/cmd/ini.c
index 7c3849bd50b..54315adce79 100644
--- a/cmd/ini.c
+++ b/cmd/ini.c
@@ -19,6 +19,7 @@
 #include <linux/ctype.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_INI_MAX_LINE
 #define MAX_LINE CONFIG_INI_MAX_LINE
diff --git a/cmd/io.c b/cmd/io.c
index 62141846bab..af23f3fc628 100644
--- a/cmd/io.c
+++ b/cmd/io.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Display values from last command */
 static ulong last_addr, last_size;
diff --git a/cmd/iotrace.c b/cmd/iotrace.c
index f6db7ad48ea..05cea98612a 100644
--- a/cmd/iotrace.c
+++ b/cmd/iotrace.c
@@ -8,6 +8,7 @@
 #include <iotrace.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 static void do_print_stats(void)
 {
diff --git a/cmd/itest.c b/cmd/itest.c
index 5824a7f18d4..12565244688 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -18,6 +18,7 @@
 #include <mapmem.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index b2dba80cf2c..5c59964feaa 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -84,6 +84,7 @@
 #include <linux/ctype.h>
 #include <cramfs/cramfs_fs.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <linux/mtd/rawnand.h>
diff --git a/cmd/legacy-mtd-utils.c b/cmd/legacy-mtd-utils.c
index 2918ee6d28d..def89fa0fc8 100644
--- a/cmd/legacy-mtd-utils.c
+++ b/cmd/legacy-mtd-utils.c
@@ -8,6 +8,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/string.h>
 #include <mtd.h>
+#include <linux/types.h>
 
 static int get_part(const char *partname, int *idx, loff_t *off, loff_t *size,
 	     loff_t *maxsize, int devtype)
diff --git a/cmd/legacy-mtd-utils.h b/cmd/legacy-mtd-utils.h
index ac441d5558a..a158439b9c0 100644
--- a/cmd/legacy-mtd-utils.h
+++ b/cmd/legacy-mtd-utils.h
@@ -3,6 +3,7 @@
 #ifndef __LEGACY_MTD_UTILS_H
 #define __LEGACY_MTD_UTILS_H
 
+#include <linux/types.h>
 int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
 		loff_t *maxsize, int devtype, uint64_t chipsize);
 int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c
index d70f6d11462..2a1a6b669e3 100644
--- a/cmd/legacy_led.c
+++ b/cmd/legacy_led.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <command.h>
 #include <status_led.h>
diff --git a/cmd/load.c b/cmd/load.c
index c550f7643a9..dec8612d2d1 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -26,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/log.c b/cmd/log.c
index d9c76ccdd2b..1ef1422d6b8 100644
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static char log_fmt_chars[LOGF_COUNT] = "clFLfm";
 
diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c
index 1452a7ac558..5b13d385ffa 100644
--- a/cmd/lzmadec.c
+++ b/cmd/lzmadec.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include <lzma/LzmaTools.h>
 
diff --git a/cmd/md5sum.c b/cmd/md5sum.c
index 2fb8d7b2759..26e7acddd5a 100644
--- a/cmd/md5sum.c
+++ b/cmd/md5sum.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/md5.h>
 #include <asm/io.h>
 
diff --git a/cmd/mdio.c b/cmd/mdio.c
index 9f2b6e23179..b45a745a413 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static char last_op[2];
 static uint last_data;
diff --git a/cmd/mem.c b/cmd/mem.c
index b7b28565a6a..206fc263c01 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -22,6 +22,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <rand.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -34,6 +35,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/mii.c b/cmd/mii.c
index aa7bb2b9f60..813a75e4c13 100644
--- a/cmd/mii.c
+++ b/cmd/mii.c
@@ -11,10 +11,12 @@
 #include <common.h>
 #include <command.h>
 #include <miiphy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 typedef struct _MII_field_desc_t {
 	ushort hi;
diff --git a/cmd/misc.c b/cmd/misc.c
index 65bc67f6da0..09e161a0ccf 100644
--- a/cmd/misc.c
+++ b/cmd/misc.c
@@ -15,6 +15,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
 		    char *const argv[])
diff --git a/cmd/mmc.c b/cmd/mmc.c
index c3fe18a5907..aaf8ddb6afc 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -14,8 +14,10 @@
 #include <part.h>
 #include <sparse_format.h>
 #include <image-sparse.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/cmd/mtd.c b/cmd/mtd.c
index 24144546f9a..b619cf5fd61 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <mtd.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/devres.h>
@@ -21,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/ctype.h>
 
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index f18a6e70f10..2a97f61e50a 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -84,6 +84,7 @@
 #include <linux/err.h>
 #include <linux/mtd/mtd.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <linux/mtd/rawnand.h>
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 992e6106256..fefd133cc1e 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <spi_flash.h>
 #include <spi.h>
diff --git a/cmd/nand.c b/cmd/nand.c
index f2f29a326fe..a7d6505bfb5 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -37,6 +37,7 @@
 #include <jffs2/jffs2.h>
 #include <nand.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "legacy-mtd-utils.h"
 
diff --git a/cmd/net.c b/cmd/net.c
index 691cef17368..d1f71def5e3 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int netboot_common(enum proto_t, struct cmd_tbl *, int, char * const []);
 
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 2fbbe52371b..7279154c273 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -43,6 +44,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 #include <linux/stddef.h>
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c
index 91214c93e22..c8f3015e062 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -16,11 +16,13 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <rtc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <uuid.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * From efi_variable.c,
diff --git a/cmd/onenand.c b/cmd/onenand.c
index 252636012c1..05bdf2b95ca 100644
--- a/cmd/onenand.c
+++ b/cmd/onenand.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
diff --git a/cmd/osd.c b/cmd/osd.c
index a7527f8a73d..d5bbfef3a94 100644
--- a/cmd/osd.c
+++ b/cmd/osd.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Container for selected OSD device */
 static struct udevice *osd_cur;
diff --git a/cmd/pcap.c b/cmd/pcap.c
index b5a3b3c0444..2a03d8ffb16 100644
--- a/cmd/pcap.c
+++ b/cmd/pcap.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <net/pcap.h>
 
 static int do_pcap_init(struct cmd_tbl *cmdtp, int flag, int argc,
diff --git a/cmd/pci.c b/cmd/pci.c
index 1ce1a7a3627..9a063a91dbc 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -19,6 +19,7 @@
 #include <console.h>
 #include <dm.h>
 #include <init.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
@@ -27,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct pci_reg_info {
 	const char *name;
diff --git a/cmd/pmic.c b/cmd/pmic.c
index b26b1310558..3fd6245ae31 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -12,6 +12,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 
 #define LIMIT_DEV	32
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 86f280bb105..1b26bf4f55a 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -13,6 +13,7 @@
 #include <mapmem.h>
 #include <lcd.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
@@ -21,6 +22,7 @@
 #include <linux/ctype.h>
 #include <errno.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 #include <splash.h>
 #include <asm/io.h>
diff --git a/cmd/pxe_utils.h b/cmd/pxe_utils.h
index 1a25ca4e88e..8976a392a8a 100644
--- a/cmd/pxe_utils.h
+++ b/cmd/pxe_utils.h
@@ -5,6 +5,7 @@
 
 #include <stdbool.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 /*
  * A note on the pxe file parser.
diff --git a/cmd/qfw.c b/cmd/qfw.c
index ca60a05f6b1..d45ba93e2b6 100644
--- a/cmd/qfw.c
+++ b/cmd/qfw.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * This function prepares kernel for zboot. It loads kernel data
diff --git a/cmd/read.c b/cmd/read.c
index 254925c1f78..61dd5ceb13f 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -13,6 +13,7 @@
 #include <part.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
diff --git a/cmd/regulator.c b/cmd/regulator.c
index e4968b7b372..98286a4dfc7 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <errno.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/uclass-internal.h>
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 8a2f976a213..4bf069f7425 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -18,6 +18,7 @@
 #include <asm/byteorder.h>
 #include <reiserfs.h>
 #include <part.h>
+#include <linux/types.h>
 
 #if !CONFIG_IS_ENABLED(DOS_PARTITION)
 #error DOS partition support must be selected
diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c
index 48f0e4684ce..fff69866805 100644
--- a/cmd/remoteproc.c
+++ b/cmd/remoteproc.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * print_remoteproc_list() - print all the remote processor devices
diff --git a/cmd/rng.c b/cmd/rng.c
index 92d7c0de639..f498c35fdb3 100644
--- a/cmd/rng.c
+++ b/cmd/rng.c
@@ -12,6 +12,7 @@
 #include <rng.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 static int do_rng(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
diff --git a/cmd/rtc.c b/cmd/rtc.c
index 78af8534e4a..db7341d5a61 100644
--- a/cmd/rtc.c
+++ b/cmd/rtc.c
@@ -10,6 +10,7 @@
 #include <rtc.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
diff --git a/cmd/setexpr.c b/cmd/setexpr.c
index 9aefaeb1413..03beb0c1f53 100644
--- a/cmd/setexpr.c
+++ b/cmd/setexpr.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static ulong get_arg(char *s, int w)
 {
diff --git a/cmd/sf.c b/cmd/sf.c
index d57da5f8b0b..f85f60774ae 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -16,6 +16,7 @@
 #include <mapmem.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -24,6 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/mtd/mtd.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <dm/device-internal.h>
diff --git a/cmd/source.c b/cmd/source.c
index d5488a903ef..d980d3ca62a 100644
--- a/cmd/source.c
+++ b/cmd/source.c
@@ -25,6 +25,7 @@
 #include <vsprintf.h>
 #include <asm/byteorder.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_FIT)
 /**
diff --git a/cmd/spi.c b/cmd/spi.c
index 2079ed0e1be..9698e0d042a 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -17,6 +17,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*-----------------------------------------------------------------------
  * Definitions
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index c036df8a1f8..903d6235050 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/time.c b/cmd/time.c
index 7d4345bbf74..4672fe9d375 100644
--- a/cmd/time.c
+++ b/cmd/time.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 static void report_time(ulong cycles)
 {
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index da052a9845b..7944e8daa3b 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -17,6 +17,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -24,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #include "tlv_eeprom.h"
diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c
index 2df4dc06920..6296c9d9da7 100644
--- a/cmd/tpm-common.c
+++ b/cmd/tpm-common.c
@@ -13,6 +13,7 @@
 #include <asm/unaligned.h>
 #include <linux/string.h>
 #include <tpm-common.h>
+#include <linux/types.h>
 #include "tpm-user-utils.h"
 
 static struct udevice *tpm_dev;
diff --git a/cmd/tpm-user-utils.h b/cmd/tpm-user-utils.h
index 358ddff5761..7a763d2b4cc 100644
--- a/cmd/tpm-user-utils.h
+++ b/cmd/tpm-user-utils.h
@@ -7,6 +7,7 @@
 #ifndef __TPM_USER_UTILS_H
 #define __TPM_USER_UTILS_H
 
+#include <linux/types.h>
 void print_byte_string(u8 *data, size_t count);
 void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr);
 int report_return_code(int return_code);
diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index 0c96b10f06c..495c17ef12b 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -14,6 +14,7 @@
 #include <tpm-v1.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tpm-user-utils.h"
 
 static int do_tpm_startup(struct cmd_tbl *cmdtp, int flag, int argc,
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c
index 2be09f547d5..d7201df3a29 100644
--- a/cmd/tpm-v2.c
+++ b/cmd/tpm-v2.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tpm-user-utils.h"
 
 static int do_tpm2_startup(struct cmd_tbl *cmdtp, int flag, int argc,
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index 3a345877a25..5d4aafa67cb 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -12,6 +12,7 @@
 #include <tpm-v1.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "tpm-user-utils.h"
 
 /* Prints error and returns on failure */
diff --git a/cmd/trace.c b/cmd/trace.c
index 46b498700e9..063012082fe 100644
--- a/cmd/trace.c
+++ b/cmd/trace.c
@@ -12,6 +12,7 @@
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static int get_args(int argc, char *const argv[], char **buff,
 		    size_t *buff_ptr, size_t *buff_size)
diff --git a/cmd/tsi148.c b/cmd/tsi148.c
index 17f7f192f96..928eedc08c9 100644
--- a/cmd/tsi148.c
+++ b/cmd/tsi148.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <tsi148.h>
 
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 80c175eec51..d8f54fdc828 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -20,6 +20,7 @@
 #include <mtd.h>
 #include <nand.h>
 #include <onenand_uboot.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/devres.h>
@@ -31,6 +32,7 @@
 #include <linux/errno.h>
 #include <jffs2/load_kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #undef ubi_msg
 #define ubi_msg(fmt, ...) printf("UBI: " fmt "\n", ##__VA_ARGS__)
diff --git a/cmd/ubifs.c b/cmd/ubifs.c
index 191199c0762..0f1aebde0f2 100644
--- a/cmd/ubifs.c
+++ b/cmd/ubifs.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <ubifs_uboot.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 
 static int ubifs_initialized;
 static int ubifs_mounted;
diff --git a/cmd/universe.c b/cmd/universe.c
index b1eeff7a660..39eaf9af9ab 100644
--- a/cmd/universe.c
+++ b/cmd/universe.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <universe.h>
 
diff --git a/cmd/unlz4.c b/cmd/unlz4.c
index a885c93dc4b..3c3d928243a 100644
--- a/cmd/unlz4.c
+++ b/cmd/unlz4.c
@@ -10,6 +10,7 @@
 #include <lz4.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc,
 		    char *const argv[])
diff --git a/cmd/usb.c b/cmd/usb.c
index 6a6d20096ad..27cf810ade8 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -25,6 +25,7 @@
 #include <part.h>
 #include <usb.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_USB_STORAGE
 static int usb_stor_curr_dev = -1; /* current device */
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 36a905cd771..24979bd97d7 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int ums_read_sector(struct ums *ums_dev,
 			   ulong start, lbaint_t blkcnt, void *buf)
diff --git a/cmd/version.c b/cmd/version.c
index dcd91f09fa1..874fd68e186 100644
--- a/cmd/version.c
+++ b/cmd/version.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <stdio.h>
 #include <version.h>
diff --git a/cmd/w1.c b/cmd/w1.c
index 7c13d83553a..b7cf0323234 100644
--- a/cmd/w1.c
+++ b/cmd/w1.c
@@ -10,6 +10,7 @@
 #include <vsprintf.h>
 #include <w1.h>
 #include <w1-eeprom.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <linux/string.h>
 
diff --git a/cmd/wdt.c b/cmd/wdt.c
index c9c7a610efd..0a8ef782811 100644
--- a/cmd/wdt.c
+++ b/cmd/wdt.c
@@ -12,6 +12,7 @@
 #include <vsprintf.h>
 #include <wdt.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static struct udevice *currdev;
 
diff --git a/cmd/wol.c b/cmd/wol.c
index 61a9d95e0eb..48359adb6e9 100644
--- a/cmd/wol.c
+++ b/cmd/wol.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_WOL)
 void wol_set_timeout(ulong);
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index 933fe8af406..d7129894836 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -9,6 +9,7 @@
 #include <asm/fsp/fsp_support.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index ed1c42f4934..fcb3dee2e60 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/hob.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c
index a766eca7856..cccdc3afbfc 100644
--- a/cmd/x86/mtrr.c
+++ b/cmd/x86/mtrr.c
@@ -13,6 +13,7 @@
 #include <asm/mp.h>
 #include <asm/mtrr.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const char *const mtrr_type_name[MTRR_TYPE_COUNT] = {
 	"Uncacheable",
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 68f3d14c5b7..f9032bea3e1 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SYS_XIMG_LEN
 /* use 8MByte as default max gunzip size */
diff --git a/cmd/yaffs2.c b/cmd/yaffs2.c
index 29b52f7ceda..fe9a2bb6c95 100644
--- a/cmd/yaffs2.c
+++ b/cmd/yaffs2.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <config.h>
 #include <command.h>
diff --git a/cmd/zfs.c b/cmd/zfs.c
index dde1c097c63..5c59d44337b 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -22,6 +22,7 @@
 #include <linux/stat.h>
 #include <malloc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
 #include <usb.h>
diff --git a/common/android_ab.c b/common/android_ab.c
index 5b0cb0b1d75..6e85b0f67c2 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -10,10 +10,12 @@
 #include <malloc.h>
 #include <part.h>
 #include <memalign.h>
+#include <stdbool.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <u-boot/crc.h>
 
diff --git a/common/autoboot.c b/common/autoboot.c
index 55bb2ee7adf..1b0ab9ced76 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -25,6 +25,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/sha256.h>
 #include <bootcount.h>
 
diff --git a/common/avb_verify.c b/common/avb_verify.c
index 4c825e8553b..75a6c1f0ff0 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -11,11 +11,13 @@
 #include <image.h>
 #include <malloc.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <tee.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <tee/optee_ta_avb.h>
 
 static const unsigned char avb_root_pub[1032] = {
diff --git a/common/bloblist.c b/common/bloblist.c
index 234c40e741a..186815a9310 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -9,10 +9,12 @@
 #include <log.h>
 #include <mapmem.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/board_f.c b/common/board_f.c
index c342404bc0d..18685762900 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -13,6 +13,7 @@
 #include <bloblist.h>
 #include <bootstage.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <console.h>
 #include <cpu.h>
 #include <cpu_func.h>
@@ -38,6 +39,7 @@
 #include <spl.h>
 #endif
 #include <status_led.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <sysreset.h>
 #include <timer.h>
@@ -59,6 +61,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Pointer to initial global data area
diff --git a/common/board_info.c b/common/board_info.c
index bfa5324e821..3e9ee4b9604 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 <compiler.h>
 #include <init.h>
 #include <stdio.h>
 #include <asm/global_data.h>
diff --git a/common/board_r.c b/common/board_r.c
index 1fd3ff02162..b963dec2aa2 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <api.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <display_options.h>
 #include <exports.h>
@@ -28,6 +29,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 /* TODO: can we just include all these headers whether needed or not? */
 #if defined(CONFIG_CMD_BEDBUG)
diff --git a/common/bootm.c b/common/bootm.c
index 08570826e22..d5bd80f9a09 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -7,6 +7,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <errno.h>
@@ -17,6 +18,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -29,6 +31,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include "mkimage.h"
 #endif
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 16c8a78722a..d76533dd0b5 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <env.h>
@@ -14,6 +15,7 @@
 #include <image.h>
 #include <lmb.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -24,6 +26,7 @@
 #include <mapmem.h>
 #include <vxworks.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <tee/optee.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/bootretry.c b/common/bootretry.c
index 41d52a7b9c1..6f4fb4b2afd 100644
--- a/common/bootretry.c
+++ b/common/bootretry.c
@@ -14,6 +14,7 @@
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_BOOT_RETRY_MIN
 #define CONFIG_BOOT_RETRY_MIN CONFIG_BOOT_RETRY_TIME
diff --git a/common/bootstage.c b/common/bootstage.c
index ddb78a5dcea..721003a3a42 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index 8051c016942..39b27d6540d 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int addr_aligned(struct bounce_buffer *state)
 {
diff --git a/common/cli.c b/common/cli.c
index a83c606ee9e..f1bc0f621c4 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -13,6 +13,7 @@
 #include <cli.h>
 #include <cli_hush.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h>
 #include <env.h>
 #include <fdtdec.h>
diff --git a/common/cli_hush.c b/common/cli_hush.c
index 828b10db860..a6b6c5e5ee6 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -92,6 +92,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #ifndef __U_BOOT__
 #include <ctype.h>     /* isalpha, isdigit */
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 78c1faad8f7..066b9089f1f 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -17,6 +17,7 @@
 #include <watchdog.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/command.c b/common/command.c
index dfad65d735c..528d353aca4 100644
--- a/common/command.c
+++ b/common/command.c
@@ -19,6 +19,7 @@
 #include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Use puts() instead of printf() to avoid printf buffer overflow
diff --git a/common/common_fit.c b/common/common_fit.c
index 8872b83646a..0db92f48320 100644
--- a/common/common_fit.c
+++ b/common/common_fit.c
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 ulong fdt_getprop_u32(const void *fdt, int node, const char *prop)
 {
diff --git a/common/console.c b/common/console.c
index f7ddc1dcafc..2bac3aa0fa2 100644
--- a/common/console.c
+++ b/common/console.c
@@ -26,6 +26,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/ddr_spd.c b/common/ddr_spd.c
index 241549bd485..ad94e54b73b 100644
--- a/common/ddr_spd.c
+++ b/common/ddr_spd.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <ddr_spd.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /* used for ddr1 and ddr2 spd */
 static int
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 0f9e0d94378..be4c1b273df 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -5,6 +5,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if CONFIG_IS_ENABLED(UNIT_TEST)
 #define DEBUG
diff --git a/common/edid.c b/common/edid.c
index a1b266e9c18..a6c6170f2e3 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -14,11 +14,13 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/ctype.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int edid_check_info(struct edid1_info *edid_info)
 {
diff --git a/common/eeprom/eeprom_layout.c b/common/eeprom/eeprom_layout.c
index cfe457c7444..d2f87f4f251 100644
--- a/common/eeprom/eeprom_layout.c
+++ b/common/eeprom/eeprom_layout.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <eeprom_layout.h>
diff --git a/common/fdt_region.c b/common/fdt_region.c
index cb9bf08ce75..065fbd31050 100644
--- a/common/fdt_region.c
+++ b/common/fdt_region.c
@@ -9,6 +9,7 @@
 #include <linux/libfdt_env.h>
 #include <fdt_region.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef USE_HOSTCC
 #include <fdt.h>
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 230e599a44c..e78999f6daf 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdio_dev.h>
 #include <vsprintf.h>
diff --git a/common/flash.c b/common/flash.c
index c01cb28b92f..18b6f89b0c3 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <uuid.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <mtd/cfi_flash.h>
 
diff --git a/common/hash.c b/common/hash.c
index 91b2fc41eb5..a37172be8be 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <hw_sha.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -25,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #else
 #include "mkimage.h"
diff --git a/common/hwconfig.c b/common/hwconfig.c
index 26a561c365b..1ecb5596cfa 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -56,6 +56,7 @@ next:
 
 		arg_end = strpbrk(str, stopchs);
 		if (!arg_end)
+#include <linux/kernel.h>
 			*arglen = min(maxlen, strlen(str)) - optlen - 1;
 		else
 			*arglen = arg_end - end - 1;
diff --git a/common/image-android-dt.c b/common/image-android-dt.c
index 456c4c584f0..eb1150552cb 100644
--- a/common/image-android-dt.c
+++ b/common/image-android-dt.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <linux/libfdt.h>
 #include <mapmem.h>
+#include <linux/types.h>
 
 /**
  * Check if image header is correct.
diff --git a/common/image-android.c b/common/image-android.c
index a4dea76bde5..fd115c7a3b4 100644
--- a/common/image-android.c
+++ b/common/image-android.c
@@ -10,6 +10,7 @@
 #include <android_image.h>
 #include <malloc.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/unaligned.h>
 #include <mapmem.h>
@@ -17,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define ANDROID_IMAGE_DEFAULT_KERNEL_ADDR	0x10008000
 
diff --git a/common/image-cipher.c b/common/image-cipher.c
index 7a9892b930c..6ac263af8ab 100644
--- a/common/image-cipher.c
+++ b/common/image-cipher.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSdTCC*/
 #include <image.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index c05495ee36c..c44bad2f65f 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdt_support.h>
 #include <fdtdec.h>
 #include <env.h>
@@ -25,6 +26,7 @@
 #include <mapmem.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <tee/optee.h>
 
 #ifndef CONFIG_SYS_FDT_PAD
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index 52e82777e3d..8272fbd6734 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -10,11 +10,13 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
 #include <fdt_region.h>
diff --git a/common/image-fit.c b/common/image-fit.c
index a0683072b43..f7a5bb95ec4 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -28,6 +28,7 @@
 #include <malloc.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
 
diff --git a/common/image-sig.c b/common/image-sig.c
index aef02638d79..a177b26b96b 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/common/image.c b/common/image.c
index 341807059ee..5e01da53031 100644
--- a/common/image.c
+++ b/common/image.c
@@ -15,12 +15,14 @@
 #include <lmb.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 
diff --git a/common/init/board_init.c b/common/init/board_init.c
index d3059c46bdc..93f618f69a5 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -8,10 +8,12 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/iotrace.c b/common/iotrace.c
index d342e317d63..ebc7c29d3f0 100644
--- a/common/iotrace.c
+++ b/common/iotrace.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bug.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/lcd.c b/common/lcd.c
index b4352229c5b..4f38de6863f 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -7,6 +7,7 @@
  */
 
 /* #define DEBUG */
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <command.h>
diff --git a/common/lcd_console.c b/common/lcd_console.c
index fe2ef2f5b9e..3ce4d980671 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <lcd.h>
 #include <log.h>
 #include <serial.h>
@@ -19,6 +20,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct console_t cons;
 
diff --git a/common/lcd_console_rotation.c b/common/lcd_console_rotation.c
index 8fc333d4e32..8bbaafa4d8c 100644
--- a/common/lcd_console_rotation.c
+++ b/common/lcd_console_rotation.c
@@ -8,6 +8,7 @@
 #include <lcd.h>
 #include <stdio.h>
 #include <video_font.h>		/* Get font data, width and height */
+#include <linux/types.h>
 
 static void lcd_putc_xy90(struct console_t *pcons, ushort x, ushort y, char c)
 {
diff --git a/common/lcd_simplefb.c b/common/lcd_simplefb.c
index 7a2f0056fd4..4c4ec25a47c 100644
--- a/common/lcd_simplefb.c
+++ b/common/lcd_simplefb.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <video.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/log.c b/common/log.c
index c8d13365caa..1d42fb34b1b 100644
--- a/common/log.c
+++ b/common/log.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <dm/uclass.h>
diff --git a/common/log_syslog.c b/common/log_syslog.c
index 21c10511df1..af2a78d4f95 100644
--- a/common/log_syslog.c
+++ b/common/log_syslog.c
@@ -12,6 +12,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index b8b9d7608cd..fc436f3e112 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/memsize.c b/common/memsize.c
index d5d13d51bf1..30a090ce5d3 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <asm/global_data.h>
 
diff --git a/common/s_record.c b/common/s_record.c
index 2b7651fcffc..07fad02961e 100644
--- a/common/s_record.c
+++ b/common/s_record.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <s_record.h>
+#include <linux/types.h>
 
 static int hex1_bin (char  c);
 static int hex2_bin (char *s);
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 51d777f4ee7..8d8f5c019e5 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -10,6 +10,7 @@
 #include <bloblist.h>
 #include <binman_sym.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <dm.h>
 #include <handoff.h>
 #include <hang.h>
@@ -18,6 +19,7 @@
 #include <log.h>
 #include <serial.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -27,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <version.h>
 #include <image.h>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 6c3e839e855..cbb6194fb0a 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <atf_common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <errno.h>
 #include <image.h>
@@ -18,6 +19,7 @@
 #include <spl.h>
 #include <asm/cache.h>
 #include <linux/string.h>
+#include <linux/types.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_bootrom.c b/common/spl/spl_bootrom.c
index 0eefd39a519..cef23ca2a59 100644
--- a/common/spl/spl_bootrom.c
+++ b/common/spl/spl_bootrom.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <spl.h>
 
 __weak int board_return_to_bootrom(struct spl_image_info *spl_image,
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 4f152270da7..6b37653d558 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <image.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int spl_load_image_ext(struct spl_image_info *spl_image,
 		       struct blk_desc *block_dev, int partition,
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index f31fdee02ba..8ed7567f0f2 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -19,6 +19,7 @@
 #include <image.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
+#include <linux/types.h>
 
 static int fat_registered;
 
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 7a65035ba86..9afde9abefb 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <board.h>
 #include <fpga.h>
@@ -21,6 +22,7 @@
 #include <linux/libfdt.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index d8ca3e9873b..390fa72b7cf 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -10,6 +10,7 @@
 #include <spl.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <lzma/LzmaTypes.h>
 #include <lzma/LzmaDec.h>
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 897ea3fbfa6..2c6ccb20bf9 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -6,6 +6,7 @@
  * Aneesh V <aneesh at ti.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <part.h>
@@ -18,6 +19,7 @@
 #include <mmc.h>
 #include <image.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc,
 			   ulong sector, struct image_header *header)
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 15101f39423..6fb7001c281 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -4,6 +4,7 @@
  * Corscience GmbH & Co. KG - Simon Schwarz <schwarz at corscience.de>
  */
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <fdt_support.h>
 #include <image.h>
@@ -14,6 +15,7 @@
 #include <nand.h>
 #include <linux/libfdt_env.h>
 #include <fdt.h>
+#include <linux/types.h>
 
 uint32_t __weak spl_nand_get_uboot_raw_page(void)
 {
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index b4a0a56b701..102d64cd50f 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USB_ETHER)
 static ulong spl_net_load_read(struct spl_load_info *load, ulong sector,
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index a198577a2bd..3201b09720c 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <image.h>
 #include <log.h>
 #include <spl.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
 			       ulong count, void *buf)
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index 086759d63f2..e75d94b6df7 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 7ea0a32b0d7..e993c643f20 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -17,6 +17,7 @@
 #include <spl.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SPL_LOAD_FIT_ADDRESS
 # define CONFIG_SPL_LOAD_FIT_ADDRESS	0
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 33311c2813a..029c23e9101 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <spl.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <sata.h>
 #include <scsi.h>
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 0974e9e6f5d..8ca3d99af6a 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <image.h>
 #include <log.h>
 #include <spi.h>
@@ -19,6 +20,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index f9c7c2b04fc..f197a96ca40 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BUF_SIZE 1024
 
diff --git a/common/splash.c b/common/splash.c
index 575003e6561..e6d177ec9b5 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <env.h>
 #include <splash.h>
@@ -30,6 +31,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct splash_location default_splash_locations[] = {
 	{
diff --git a/common/splash_source.c b/common/splash_source.c
index be7e90c3880..33989d876b3 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -19,6 +19,7 @@
 #include <spi.h>
 #include <spi_flash.h>
 #include <splash.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <usb.h>
 #include <vsprintf.h>
@@ -26,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/stdio.c b/common/stdio.c
index 634ab9203af..413c4880df1 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -23,6 +23,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_SYS_I2C)
 #include <i2c.h>
diff --git a/common/update.c b/common/update.c
index f5041c6171a..4520519c667 100644
--- a/common/update.c
+++ b/common/update.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if !(defined(CONFIG_FIT) && defined(CONFIG_OF_LIBFDT))
 #error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature"
diff --git a/common/usb.c b/common/usb.c
index 98e7582c2a2..73bfe24dc3c 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -27,6 +27,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -43,6 +44,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define USB_BUFSIZ	512
 
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 5abbb1b0a40..921e8b7cdbf 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -23,16 +23,19 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 #include <asm/unaligned.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index b2967330b69..c5236eacb36 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <usb.h>
 
diff --git a/common/usb_storage.c b/common/usb_storage.c
index d46e9288c05..34f57cf26bd 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -50,6 +50,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <part.h>
 #include <usb.h>
diff --git a/common/xyzModem.c b/common/xyzModem.c
index 732548f4f2d..8868f0e2311 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -27,6 +27,7 @@
 #include <vsprintf.h>
 #include <xyzModem.h>
 #include <stdarg.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 
diff --git a/disk/part.c b/disk/part.c
index 58fd9b89e64..2e5af829d84 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -18,6 +18,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #undef	PART_DEBUG
 
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 40ae1466788..22d248dafb0 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "part_amiga.h"
 #include <part.h>
 
diff --git a/disk/part_amiga.h b/disk/part_amiga.h
index 42f5eb0f941..3c519ac420a 100644
--- a/disk/part_amiga.h
+++ b/disk/part_amiga.h
@@ -8,6 +8,7 @@
 #ifndef _DISK_PART_AMIGA_H
 #define _DISK_PART_AMIGA_H
 #include <common.h>
+#include <asm/types.h>
 
 #if CONFIG_IS_ENABLED(ISO_PARTITION)
 /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 55d5955f738..e2619a3b7f7 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -22,6 +22,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "part_dos.h"
 #include <part.h>
 
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 611df0bcf6c..a842e0fecd9 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -31,6 +31,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/disk/part_iso.c b/disk/part_iso.c
index accb95da3bc..82074226fe5 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -12,6 +12,7 @@
 #include <asm/cache.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "part_iso.h"
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
diff --git a/disk/part_mac.c b/disk/part_mac.c
index 2d9aa380168..f5f5f510214 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -18,6 +18,7 @@
 #include <memalign.h>
 #include <ide.h>
 #include <stdio.h>
+#include <linux/types.h>
 #include "part_mac.h"
 #include <part.h>
 
diff --git a/disk/part_mac.h b/disk/part_mac.h
index 5f396c94089..884494b1acd 100644
--- a/disk/part_mac.h
+++ b/disk/part_mac.h
@@ -7,6 +7,7 @@
 /*
  * See also Linux sources, fs/partitions/mac.h
  *
+#include <linux/types.h>
  * This file describes structures and values related to the standard
  * Apple SCSI disk partitioning scheme. For more information see:
  * http://developer.apple.com/techpubs/mac/Devices/Devices-126.html#MARKER-14-92
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index cf2d0c14408..4148d532239 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <regmap.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
@@ -22,6 +23,7 @@
 #include <linux/math64.h>
 #include <linux/bitfield.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define MESON_SAR_ADC_REG0					0x00
 	#define MESON_SAR_ADC_REG0_PANEL_DETECT			BIT(31)
diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
index 26e037509cd..307a263d36e 100644
--- a/drivers/adc/rockchip-saradc.c
+++ b/drivers/adc/rockchip-saradc.c
@@ -15,6 +15,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define SARADC_CTRL_CHN_MASK		GENMASK(2, 0)
 #define SARADC_CTRL_POWER_CTRL		BIT(3)
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index 0e624ea222e..54a59c8061d 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/adc/stm32-adc-core.h b/drivers/adc/stm32-adc-core.h
index ba0e10e6cc2..59bf366e253 100644
--- a/drivers/adc/stm32-adc-core.h
+++ b/drivers/adc/stm32-adc-core.h
@@ -28,6 +28,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 
 /**
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index 8c1229a383d..03bd983b3ce 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <adc.h>
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
@@ -15,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/iopoll.h>
+#include <linux/types.h>
 #include "stm32-adc-core.h"
 
 /* STM32H7 - Registers for each ADC instance */
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 1424708b59c..847d5a60f29 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <blk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
 #include <stdio.h>
@@ -18,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <command.h>
 #include <dm.h>
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 8be1826d405..58e2ef2904c 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -5,8 +5,10 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/types.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 f584317ab23..f282b88c4ba 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -9,6 +9,7 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define AHCI_PHYCS0R 0x00c0
 #define AHCI_PHYCS1R 0x00c4
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 5f37fc92784..557232491e7 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <generic-phy.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct dwc_ahci_priv {
 	void *base;
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 90db0d21014..069c5c5d188 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <blk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <dwc_ahsata.h>
@@ -28,6 +29,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "dwc_ahsata_priv.h"
 
 struct sata_port_regs {
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index 83395ef22c6..a0fbe5c9fdc 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <blk.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h>
 #include <cpu_func.h>
 #include <log.h>
@@ -25,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "fsl_sata.h"
 
 #if CONFIG_IS_ENABLED(BLK)
diff --git a/drivers/ata/fsl_sata.h b/drivers/ata/fsl_sata.h
index 5b9daa79e02..cf57e69c1b0 100644
--- a/drivers/ata/fsl_sata.h
+++ b/drivers/ata/fsl_sata.h
@@ -8,6 +8,7 @@
 #ifndef __FSL_SATA_H__
 #define __FSL_SATA_H__
 
+#include <linux/types.h>
 #define SATA_HC_MAX_NUM		4 /* Max host controller numbers */
 #define SATA_HC_MAX_CMD		16 /* Max command queue depth per host controller */
 #define SATA_HC_MAX_PORT	16 /* Max port number per host controller */
diff --git a/drivers/ata/libata.c b/drivers/ata/libata.c
index c830ef49025..3af7034708a 100644
--- a/drivers/ata/libata.c
+++ b/drivers/ata/libata.c
@@ -9,6 +9,7 @@
 #include <compiler.h>
 #include <libata.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 u64 ata_id_n_sectors(u16 *id)
diff --git a/drivers/ata/mvsata_ide.c b/drivers/ata/mvsata_ide.c
index 41f9a91617d..b312570387c 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 <asm/types.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_ARCH_ORION5X)
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index 453338e944b..4c2446e6cf6 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <blk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <part.h>
 #include <sata.h>
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index cd10d228964..dd644006282 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
+#include <linux/types.h>
 
 /* Vendor Specific Register Offsets */
 #define AHCI_VEND_PCFG  0xA4
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index b459ac5aa3b..c5e8bd264a6 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -55,6 +55,7 @@
 #include <linux/kernel.h>
 #include <linux/mbus.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/soc.h>
 #if defined(CONFIG_ARCH_KIRKWOOD)
diff --git a/drivers/ata/sata_sandbox.c b/drivers/ata/sata_sandbox.c
index e64cc4a5c10..721fbabfb17 100644
--- a/drivers/ata/sata_sandbox.c
+++ b/drivers/ata/sata_sandbox.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <linux/types.h>
 
 int init_sata(int dev)
 {
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 54a9141808b..2f7b9189bab 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if CONFIG_IS_ENABLED(BLK)
 #include <dm.h>
diff --git a/drivers/ata/sata_sil.h b/drivers/ata/sata_sil.h
index a300c0c3887..a26bdf209cc 100644
--- a/drivers/ata/sata_sil.h
+++ b/drivers/ata/sata_sil.h
@@ -8,6 +8,7 @@
 #ifndef SATA_SIL3132_H
 #define SATA_SIL3132_H
 
+#include <linux/types.h>
 #define READ_CMD	0
 #define WRITE_CMD	1
 
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 4d3a680f17f..56cee31754b 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -20,6 +20,7 @@
 #include <sata.h>
 #include <libata.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "sata_sil3114.h"
 
 /* Convert sectorsize to wordsize */
diff --git a/drivers/axi/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index e4ba71f21f1..7b4ee9c9248 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -12,6 +12,7 @@
 #include <asm/axi.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 int axi_sandbox_get_emul(struct udevice *bus, ulong address,
 			 enum axi_size_t size, struct udevice **emulp)
diff --git a/drivers/axi/axi-uclass.c b/drivers/axi/axi-uclass.c
index 3d642e71078..e0667957bf3 100644
--- a/drivers/axi/axi-uclass.c
+++ b/drivers/axi/axi-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <axi.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int axi_read(struct udevice *dev, ulong address, void *data,
 	     enum axi_size_t size)
diff --git a/drivers/axi/axi_sandbox.c b/drivers/axi/axi_sandbox.c
index 41f62065e8e..9ac065df1b9 100644
--- a/drivers/axi/axi_sandbox.c
+++ b/drivers/axi/axi_sandbox.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <asm/axi.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /*
  * This driver implements a AXI bus for the sandbox architecture for testing
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index 0e4cbab9762..0b9eaf842fb 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -15,6 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 7342230eb7f..14eaddf2a77 100644
--- a/drivers/axi/sandbox_store.c
+++ b/drivers/axi/sandbox_store.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /**
  * struct sandbox_store_priv - Private data structure of a AXI store device
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index b57d512ebb7..1444ffe446a 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -57,6 +57,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "biosemui.h"
 
 /* Length of the BIOS image */
diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c
index a8475b13886..d78a128372a 100644
--- a/drivers/bios_emulator/besys.c
+++ b/drivers/bios_emulator/besys.c
@@ -51,6 +51,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 #include "biosemui.h"
 
 /*------------------------- Global Variables ------------------------------*/
diff --git a/drivers/bios_emulator/bios.c b/drivers/bios_emulator/bios.c
index af27582275b..ff942c39a0d 100644
--- a/drivers/bios_emulator/bios.c
+++ b/drivers/bios_emulator/bios.c
@@ -45,6 +45,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include "biosemui.h"
 
 /*----------------------------- Implementation ----------------------------*/
diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c
index ca083a4d646..b73723337fc 100644
--- a/drivers/bios_emulator/biosemu.c
+++ b/drivers/bios_emulator/biosemu.c
@@ -49,6 +49,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "biosemui.h"
 
 BE_sysEnv _BE_env = {{0}};
diff --git a/drivers/bios_emulator/include/biosemu.h b/drivers/bios_emulator/include/biosemu.h
index 124d79d80e1..2857cb9bf39 100644
--- a/drivers/bios_emulator/include/biosemu.h
+++ b/drivers/bios_emulator/include/biosemu.h
@@ -44,6 +44,7 @@
 #define __BIOSEMU_H
 
 #include <bios_emul.h>
+#include <linux/types.h>
 
 #ifdef __KERNEL__
 #include "x86emu.h"
diff --git a/drivers/bios_emulator/include/x86emu/debug.h b/drivers/bios_emulator/include/x86emu/debug.h
index e80c89d763d..b09d30cea55 100644
--- a/drivers/bios_emulator/include/x86emu/debug.h
+++ b/drivers/bios_emulator/include/x86emu/debug.h
@@ -40,6 +40,7 @@
 #define __X86EMU_DEBUG_H
 
 #include <stdio.h>
+#include <linux/types.h>
 
 /*---------------------- Macros and type definitions ----------------------*/
 
diff --git a/drivers/bios_emulator/include/x86emu/decode.h b/drivers/bios_emulator/include/x86emu/decode.h
index 77769f0094c..5d4b47fd542 100644
--- a/drivers/bios_emulator/include/x86emu/decode.h
+++ b/drivers/bios_emulator/include/x86emu/decode.h
@@ -32,6 +32,7 @@
 * Environment:  Any
 * Developer:    Kendall Bennett
 *
+#include <linux/types.h>
 * Description:  Header file for instruction decoding logic.
 *
 ****************************************************************************/
diff --git a/drivers/bios_emulator/include/x86emu/ops.h b/drivers/bios_emulator/include/x86emu/ops.h
index a4f2316ba0d..eea9f306065 100644
--- a/drivers/bios_emulator/include/x86emu/ops.h
+++ b/drivers/bios_emulator/include/x86emu/ops.h
@@ -39,6 +39,7 @@
 #ifndef __X86EMU_OPS_H
 #define __X86EMU_OPS_H
 
+#include <asm/types.h>
 extern void (*x86emu_optab[0x100])(u8 op1);
 extern void (*x86emu_optab2[0x100])(u8 op2);
 
diff --git a/drivers/bios_emulator/include/x86emu/prim_ops.h b/drivers/bios_emulator/include/x86emu/prim_ops.h
index 2291e8488a5..4a1e24e44a4 100644
--- a/drivers/bios_emulator/include/x86emu/prim_ops.h
+++ b/drivers/bios_emulator/include/x86emu/prim_ops.h
@@ -43,6 +43,7 @@
 extern "C" {                        /* Use "C" linkage when in C++ mode */
 #endif
 
+#include <asm/types.h>
 u16     aaa_word (u16 d);
 u16     aas_word (u16 d);
 u16     aad_word (u16 d);
diff --git a/drivers/bios_emulator/include/x86emu/regs.h b/drivers/bios_emulator/include/x86emu/regs.h
index 4b4c5908923..d92ed8e8f04 100644
--- a/drivers/bios_emulator/include/x86emu/regs.h
+++ b/drivers/bios_emulator/include/x86emu/regs.h
@@ -41,6 +41,7 @@
 
 /*---------------------- Macros and type definitions ----------------------*/
 
+#include <asm/types.h>
 #include <linux/printk.h>
 #pragma pack(1)
 
diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator/x86emu/debug.c
index 0ada5b693b1..3314927eae6 100644
--- a/drivers/bios_emulator/x86emu/debug.c
+++ b/drivers/bios_emulator/x86emu/debug.c
@@ -43,6 +43,7 @@
 #include <linux/ctype.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "x86emu/x86emui.h"
 
 /*----------------------------- Implementation ----------------------------*/
diff --git a/drivers/bios_emulator/x86emu/decode.c b/drivers/bios_emulator/x86emu/decode.c
index e2028eaf083..a2aa9c16cd4 100644
--- a/drivers/bios_emulator/x86emu/decode.c
+++ b/drivers/bios_emulator/x86emu/decode.c
@@ -33,6 +33,7 @@
 * Developer:	Kendall Bennett
 *
 * Description:	This file includes subroutines which are related to
+#include <linux/types.h>
 *		instruction decoding and accessess of immediate data via IP.  etc.
 *
 ****************************************************************************/
diff --git a/drivers/bios_emulator/x86emu/ops.c b/drivers/bios_emulator/x86emu/ops.c
index 9c8c1eecdda..a0ce26c5967 100644
--- a/drivers/bios_emulator/x86emu/ops.c
+++ b/drivers/bios_emulator/x86emu/ops.c
@@ -35,6 +35,7 @@
 * Developer:	Kendall Bennett
 *
 * Description:	This file includes subroutines to implement the decoding
+#include <linux/types.h>
 *		and emulation of all the x86 processor instructions.
 *
 * There are approximately 250 subroutines in here, which correspond
diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c
index 6cd1ac39825..a933d8db7d0 100644
--- a/drivers/bios_emulator/x86emu/ops2.c
+++ b/drivers/bios_emulator/x86emu/ops2.c
@@ -37,6 +37,7 @@
 *
 * Description:	This file includes subroutines to implement the decoding
 *		and emulation of all the x86 extended two-byte processor
+#include <linux/types.h>
 *		instructions.
 *
 ****************************************************************************/
diff --git a/drivers/bios_emulator/x86emu/prim_ops.c b/drivers/bios_emulator/x86emu/prim_ops.c
index 7fe968cb817..a54d68e2ef9 100644
--- a/drivers/bios_emulator/x86emu/prim_ops.c
+++ b/drivers/bios_emulator/x86emu/prim_ops.c
@@ -58,6 +58,7 @@
 * 1   1	  0	0     1
 * 1   1	  1	1     1
 *
+#include <asm/types.h>
 * Construction of table for cout:
 *
 * ab
diff --git a/drivers/bios_emulator/x86emu/sys.c b/drivers/bios_emulator/x86emu/sys.c
index 53891960c0c..f34da2e238b 100644
--- a/drivers/bios_emulator/x86emu/sys.c
+++ b/drivers/bios_emulator/x86emu/sys.c
@@ -40,6 +40,7 @@
 ****************************************************************************/
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/printk.h>
 #include "x86emu/x86emui.h"
 
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 5d7d3d616ee..d648677fe1d 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/device-internal.h>
@@ -18,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const char *if_typename_str[IF_TYPE_COUNT] = {
 	[IF_TYPE_IDE]		= "ide",
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index c1a78f72a36..6ceeb52c808 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -7,10 +7,12 @@
 #include <common.h>
 #include <blk.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct blk_driver *blk_driver_lookup_type(int if_type)
 {
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index c7b37bfe11b..6db3ccb3cf3 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <ata.h>
 #include <blk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <ide.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef __PPC__
 # define EIEIO		__asm__ volatile ("eieio")
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index 08c9b6a3b36..8c471ea24b1 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <dm/device-internal.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/board/board-uclass.c b/drivers/board/board-uclass.c
index 7a83862563c..efcb7e29691 100644
--- a/drivers/board/board-uclass.c
+++ b/drivers/board/board-uclass.c
@@ -9,6 +9,7 @@
 #include <board.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int board_get(struct udevice **devp)
 {
diff --git a/drivers/board/sandbox.c b/drivers/board/sandbox.c
index 0ed52a77396..722e322f302 100644
--- a/drivers/board/sandbox.c
+++ b/drivers/board/sandbox.c
@@ -7,9 +7,11 @@
 #include <common.h>
 #include <dm.h>
 #include <board.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "sandbox.h"
 
diff --git a/drivers/bootcount/bootcount-uclass.c b/drivers/bootcount/bootcount-uclass.c
index 81ca0027ebd..58ba6ef87d4 100644
--- a/drivers/bootcount/bootcount-uclass.c
+++ b/drivers/bootcount/bootcount-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 int dm_bootcount_get(struct udevice *dev, u32 *bootcount)
 {
diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c
index 82de6f72069..093dfd8caae 100644
--- a/drivers/bootcount/bootcount.c
+++ b/drivers/bootcount/bootcount.c
@@ -5,11 +5,14 @@
  */
 
 #include <bootcount.h>
+#include <compiler.h>
 #include <cpu_func.h>
+#include <stdbool.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_DM_BOOTCOUNT)
 /* Now implement the generic default functions */
diff --git a/drivers/bootcount/bootcount_at91.c b/drivers/bootcount/bootcount_at91.c
index c4ab5ceafab..571d2c26ccd 100644
--- a/drivers/bootcount/bootcount_at91.c
+++ b/drivers/bootcount/bootcount_at91.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_gpbr.h>
+#include <linux/types.h>
 
 /*
  * We combine the CONFIG_SYS_BOOTCOUNT_MAGIC and bootcount in one 32-bit
diff --git a/drivers/bootcount/bootcount_davinci.c b/drivers/bootcount/bootcount_davinci.c
index 6326957d7b0..279ac660f5d 100644
--- a/drivers/bootcount/bootcount_davinci.c
+++ b/drivers/bootcount/bootcount_davinci.c
@@ -10,6 +10,7 @@
 
 #include <bootcount.h>
 #include <asm/davinci_rtc.h>
+#include <linux/types.h>
 
 void bootcount_store(ulong a)
 {
diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c
index b75c9002b2c..7a3e091d5cc 100644
--- a/drivers/bootcount/bootcount_env.c
+++ b/drivers/bootcount/bootcount_env.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <linux/types.h>
 
 void bootcount_store(ulong a)
 {
diff --git a/drivers/bootcount/bootcount_ext.c b/drivers/bootcount/bootcount_ext.c
index 44f97a1054f..f20e6632dcc 100644
--- a/drivers/bootcount/bootcount_ext.c
+++ b/drivers/bootcount/bootcount_ext.c
@@ -7,6 +7,7 @@
 #include <fs.h>
 #include <mapmem.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #define BC_MAGIC	0xbd
 #define BC_VERSION	1
diff --git a/drivers/bootcount/bootcount_i2c.c b/drivers/bootcount/bootcount_i2c.c
index 6f8d12e8fdd..d0ffe56516d 100644
--- a/drivers/bootcount/bootcount_i2c.c
+++ b/drivers/bootcount/bootcount_i2c.c
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <linux/compiler.h>
 #include <i2c.h>
+#include <linux/types.h>
 
 #define BC_MAGIC	0xbc
 
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index a34d154b310..9e47ee73802 100644
--- a/drivers/bootcount/bootcount_ram.c
+++ b/drivers/bootcount/bootcount_ram.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/bootcount/i2c-eeprom.c b/drivers/bootcount/i2c-eeprom.c
index 141713c3d52..ab1ef70986b 100644
--- a/drivers/bootcount/i2c-eeprom.c
+++ b/drivers/bootcount/i2c-eeprom.c
@@ -10,6 +10,7 @@
 #include <i2c_eeprom.h>
 #include <log.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static const u8 bootcount_magic = 0xbc;
 
diff --git a/drivers/bootcount/rtc.c b/drivers/bootcount/rtc.c
index c6b30cd1483..c3da933565e 100644
--- a/drivers/bootcount/rtc.c
+++ b/drivers/bootcount/rtc.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <log.h>
 #include <rtc.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index ea08d66a070..0fbbe3b5a51 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/cache/cache-l2x0.c b/drivers/cache/cache-l2x0.c
index a1556fbf174..5a61ab2c5a2 100644
--- a/drivers/cache/cache-l2x0.c
+++ b/drivers/cache/cache-l2x0.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <asm/types.h>
 
 #include <asm/io.h>
 #include <asm/pl310.h>
diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c
index 279e3c2801b..24d92e8b04f 100644
--- a/drivers/cache/cache-ncore.c
+++ b/drivers/cache/cache-ncore.c
@@ -3,11 +3,13 @@
  * Copyright (C) 2019 Intel Corporation <www.intel.com>
  *
  */
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <stdio.h>
 #include <wait_bit.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index 298eadb4af1..5ecb565c1b2 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <cache.h>
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <stdio.h>
@@ -15,6 +16,7 @@
 #include <dm/ofnode.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct l2cache {
 	volatile u64	configure;
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 358201e3d98..e3ec96a47e9 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
@@ -15,6 +16,7 @@
 #include <dt-bindings/clock/agilex-clock.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock_manager.h>
 
diff --git a/drivers/clk/altera/clk-agilex.h b/drivers/clk/altera/clk-agilex.h
index cd68ebc4387..2df7844963c 100644
--- a/drivers/clk/altera/clk-agilex.h
+++ b/drivers/clk/altera/clk-agilex.h
@@ -7,6 +7,7 @@
 #define	_CLK_AGILEX_
 
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index 53e28ed76d0..5c195bdb1b2 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock_manager.h>
 
diff --git a/drivers/clk/analogbits/wrpll-cln28hpc.c b/drivers/clk/analogbits/wrpll-cln28hpc.c
index 66464300377..ba746ed7e38 100644
--- a/drivers/clk/analogbits/wrpll-cln28hpc.c
+++ b/drivers/clk/analogbits/wrpll-cln28hpc.c
@@ -7,6 +7,7 @@
  * This library supports configuration parsing and reprogramming of
  * the CLN28HPC variant of the Analog Bits Wide Range PLL.  The
  * intention is for this library to be reusable for any device that
+#include <asm/types.h>
  * integrates this PLL; thus the register structure and programming
  * details are expected to be provided by a separate IP block driver.
  *
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index 038898abbb0..b1f5e2668d8 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
@@ -16,6 +17,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * MAC Clock Delay settings, taken from Aspeed SDK
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index 4948f02c42f..86e026ca1ab 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -13,6 +13,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
index b27aeacc7e9..94aea636e52 100644
--- a/drivers/clk/at91/clk-h32mx.c
+++ b/drivers/clk/at91/clk-h32mx.c
@@ -11,6 +11,7 @@
 #include <dm/device_compat.h>
 #include <dm/util.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index 85ec506de12..cff796e5477 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c
index 87a7d1ea8f2..9bb88576b64 100644
--- a/drivers/clk/at91/clk-master.c
+++ b/drivers/clk/at91/clk-master.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c
index cd9d5e77c02..0bf2132abfe 100644
--- a/drivers/clk/at91/clk-peripheral.c
+++ b/drivers/clk/at91/clk-peripheral.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-plla.c b/drivers/clk/at91/clk-plla.c
index ae7df40f20d..8715732764d 100644
--- a/drivers/clk/at91/clk-plla.c
+++ b/drivers/clk/at91/clk-plla.c
@@ -10,6 +10,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-plladiv.c b/drivers/clk/at91/clk-plladiv.c
index 7c074327e27..5b8d5a80513 100644
--- a/drivers/clk/at91/clk-plladiv.c
+++ b/drivers/clk/at91/clk-plladiv.c
@@ -9,6 +9,7 @@
 #include <dm/device.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
index 1f8665768b0..0a45ab50781 100644
--- a/drivers/clk/at91/clk-slow.c
+++ b/drivers/clk/at91/clk-slow.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/types.h>
 
 static int at91_slow_clk_enable(struct clk *clk)
 {
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index 8e1a5f75774..4a27be6a692 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -10,6 +10,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.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 3b5fedd9bbe..ea77ae0e3cf 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -12,6 +12,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
 
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
index 99a1ae86535..60f461ce7f6 100644
--- a/drivers/clk/at91/clk-utmi.c
+++ b/drivers/clk/at91/clk-utmi.c
@@ -11,6 +11,7 @@
 #include <syscon.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include <mach/at91_pmc.h>
 #include <mach/at91_sfr.h>
 #include "pmc.h"
diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index a6e49a7765e..6782f9e14bc 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -16,6 +16,7 @@
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define MAX_NUMBER_OF_PLLS		4
 #define MAX_NUMER_OF_OUTPUTS		9
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index 62d404d791d..f31cdf246a1 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -14,6 +14,7 @@
 #include <clk.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index fb5029c40a3..749d56aecec 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -10,6 +10,8 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
@@ -27,6 +29,7 @@
 #include <div64.h>
 #include <clk.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "clk.h"
 
 #define UBOOT_DM_CLK_CCF_DIVIDER "ccf_clk_divider"
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index c181c0b6ea5..0197debd9c3 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -14,6 +14,7 @@
 #include <div64.h>
 #include <clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "clk.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index 221db043abc..0d42326a046 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -8,9 +8,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index c2b33b41f84..ac2cb5a86f1 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -11,9 +11,11 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
@@ -22,6 +24,7 @@
 #include <asm/arcregs.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <dt-bindings/clock/snps,hsdk-cgu.h>
 
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index cba7113f3b6..7c6d35643bd 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -22,10 +22,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index 45ce1995d03..76f6bd70169 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -20,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <k3-avs.h>
+#include <linux/types.h>
 
 /**
  * struct ti_sci_clk_data - clock controller information structure
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 090d0f21693..a1bee1b91dd 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <dm/devres.h>
@@ -22,6 +23,7 @@
 #include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static inline const struct clk_ops *clk_dev_ops(struct udevice *dev)
 {
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f2d0981e191..305e2f085dc 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -15,6 +15,7 @@
 #include <dm/device-internal.h>
 #include <clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int clk_register(struct clk *clk, const char *drv_name,
 		 const char *name, const char *parent_name)
diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
index a03cee546c7..27fd147fc1b 100644
--- a/drivers/clk/clk_bcm6345.c
+++ b/drivers/clk/clk_bcm6345.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/drivers/clk/clk_boston.c b/drivers/clk/clk_boston.c
index c97d457062c..ec1159e6c82 100644
--- a/drivers/clk/clk_boston.c
+++ b/drivers/clk/clk_boston.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct clk_boston {
 	struct regmap *regmap;
diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c
index cf9c4ae367f..d73c1acc570 100644
--- a/drivers/clk/clk_fixed_factor.c
+++ b/drivers/clk/clk_fixed_factor.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 struct clk_fixed_factor {
 	struct clk parent;
diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c
index 2c20eddb0b5..8303d8da010 100644
--- a/drivers/clk/clk_fixed_rate.c
+++ b/drivers/clk/clk_fixed_rate.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <linux/clk-provider.h>
+#include <linux/types.h>
 
 static ulong clk_fixed_rate_get_rate(struct clk *clk)
 {
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index c9b047914a4..6c46a6ab323 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <div64.h>
 #include <stdio.h>
@@ -18,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
 
diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c
index ad68c617407..4cca81b9fd7 100644
--- a/drivers/clk/clk_sandbox.c
+++ b/drivers/clk/clk_sandbox.c
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <asm/clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct sandbox_clk_priv {
 	bool probed;
diff --git a/drivers/clk/clk_sandbox_ccf.c b/drivers/clk/clk_sandbox_ccf.c
index b528c635552..3f5a823d8d2 100644
--- a/drivers/clk/clk_sandbox_ccf.c
+++ b/drivers/clk/clk_sandbox_ccf.c
@@ -7,9 +7,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <clk.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <asm/clk.h>
 #include <clk-uclass.h>
 #include <dm/devres.h>
@@ -19,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * Sandbox implementation of CCF primitives necessary for clk-uclass testing
diff --git a/drivers/clk/clk_sandbox_test.c b/drivers/clk/clk_sandbox_test.c
index 6eef29f9dc3..ac4c13dc9a5 100644
--- a/drivers/clk/clk_sandbox_test.c
+++ b/drivers/clk/clk_sandbox_test.c
@@ -11,6 +11,7 @@
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct sandbox_clk_test {
 	struct clk clks[SANDBOX_CLK_TEST_NON_DEVM_COUNT];
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/clk_stm32f.c
index b0d5699e080..e923559ef3c 100644
--- a/drivers/clk/clk_stm32f.c
+++ b/drivers/clk/clk_stm32f.c
@@ -8,12 +8,14 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stm32_rcc.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 d97a211423c..e43ff595d68 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -15,6 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <dt-bindings/clock/stm32h7-clks.h>
 
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index a57f3f81f73..2d4a4ec308f 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -5,12 +5,14 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <init.h>
 #include <log.h>
 #include <regmap.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <time.h>
@@ -25,6 +27,7 @@
 #include <dt-bindings/clock/stm32mp1-clksrc.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index de309923b10..58f8decceda 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MAX_PARENT			100
 #define MAX_NODES			6
diff --git a/drivers/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index 950c72d573a..6fd8450c5bf 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -15,6 +15,7 @@
 #include <misc.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define CLK_FUNCTION		BIT(20)
 
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index e20b668fd84..0dde3c435aa 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -11,6 +11,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
@@ -22,6 +23,7 @@
 #include <asm/arch/sys_proto.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Register bitfield defines */
 #define PLLCTRL_FBDIV_MASK	0x7f000
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index 0fb220022ca..5975b11dd59 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
@@ -18,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static const resource_size_t zynqmp_crf_apb_clkc_base = 0xfd1a0020;
 static const resource_size_t zynqmp_crl_apb_clkc_base = 0xff5e0020;
diff --git a/drivers/clk/exynos/clk-exynos7420.c b/drivers/clk/exynos/clk-exynos7420.c
index d86f84acef1..4b8cd3700ff 100644
--- a/drivers/clk/exynos/clk-exynos7420.c
+++ b/drivers/clk/exynos/clk-exynos7420.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <dt-bindings/clock/exynos7420-clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "clk-pll.h"
 
 #define DIVIDER(reg, shift, mask)	\
diff --git a/drivers/clk/exynos/clk-pll.c b/drivers/clk/exynos/clk-pll.c
index 407fc71d415..3ede604f59e 100644
--- a/drivers/clk/exynos/clk-pll.c
+++ b/drivers/clk/exynos/clk-pll.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <div64.h>
+#include <linux/types.h>
 
 #define PLL145X_MDIV_SHIFT	16
 #define PLL145X_MDIV_MASK	0x3ff
diff --git a/drivers/clk/ics8n3qv01.c b/drivers/clk/ics8n3qv01.c
index 7d551b7c8d8..bc2fd15a512 100644
--- a/drivers/clk/ics8n3qv01.c
+++ b/drivers/clk/ics8n3qv01.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.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 d03e48bfb3c..8a8e2d5a858 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 <compiler.h>
 #include <log.h>
 #include <asm/io.h>
 #include <malloc.h>
@@ -14,6 +15,7 @@
 #include <clk.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "clk.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index f1b06731bce..12e7864f678 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
@@ -24,6 +25,7 @@
 #include <clk.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "clk.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index ddfa3deccbd..ccc4adf2e5e 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -8,12 +8,14 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx6qdl-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index 8b09554d3f4..4692dc7f39f 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -17,6 +18,7 @@
 #include <dt-bindings/soc/imx_rsrc.h>
 #include <misc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "clk-imx8.h"
 
diff --git a/drivers/clk/imx/clk-imx8.h b/drivers/clk/imx/clk-imx8.h
index 7a1433d2af6..cbf88f98816 100644
--- a/drivers/clk/imx/clk-imx8.h
+++ b/drivers/clk/imx/clk-imx8.h
@@ -5,6 +5,7 @@
  */
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct imx8_clks {
 	ulong id;
 	const char *name;
diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index 02a006dd58e..386180b96e3 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -7,13 +7,16 @@
 #include <common.h>
 #include <clk.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mm-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index e8286e5e164..ab0b3eb2d22 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -7,13 +7,16 @@
 #include <common.h>
 #include <clk.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mn-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index b6a6ad73a68..cb0eb4113e7 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -7,13 +7,16 @@
 #include <common.h>
 #include <clk.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mp-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
index e21102c319d..38d9e110f9a 100644
--- a/drivers/clk/imx/clk-imx8qm.c
+++ b/drivers/clk/imx/clk-imx8qm.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/clock.h>
@@ -16,6 +17,7 @@
 #include <misc.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk-imx8.h"
 
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index d061f11a756..0fd8b1c6106 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/clock.h>
@@ -16,6 +17,7 @@
 #include <misc.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk-imx8.h"
 
diff --git a/drivers/clk/imx/clk-imxrt1020.c b/drivers/clk/imx/clk-imxrt1020.c
index 898dfe31084..d337f73d1fa 100644
--- a/drivers/clk/imx/clk-imxrt1020.c
+++ b/drivers/clk/imx/clk-imxrt1020.c
@@ -8,11 +8,13 @@
 #include <clk.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imxrt1020-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index fc022f54a75..bfc66dafac3 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -9,11 +9,13 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imxrt1050-clock.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-pfd.c b/drivers/clk/imx/clk-pfd.c
index 9b2fce7174a..2e2514d26a3 100644
--- a/drivers/clk/imx/clk-pfd.c
+++ b/drivers/clk/imx/clk-pfd.c
@@ -15,9 +15,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/devres.h>
 #include <linux/clk-provider.h>
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 147bf315980..d091597c760 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -6,6 +6,8 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
@@ -21,6 +23,7 @@
 #include <div64.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include "clk.h"
 
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index ec690a24981..8cb02c172a2 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -5,6 +5,8 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <malloc.h>
@@ -15,6 +17,7 @@
 #include <clk.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "clk.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 04b7bb78dae..3eb2769da30 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -6,6 +6,8 @@
 #ifndef __MACH_IMX_CLK_H
 #define __MACH_IMX_CLK_H
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/clk-provider.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/clk/intel/clk_intel.c b/drivers/clk/intel/clk_intel.c
index 371898f2744..cfea9780bd5 100644
--- a/drivers/clk/intel/clk_intel.c
+++ b/drivers/clk/intel/clk_intel.c
@@ -9,6 +9,7 @@
 #include <clk-uclass.h>
 #include <dt-bindings/clock/intel-clock.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static ulong intel_clk_get_rate(struct clk *clk)
 {
diff --git a/drivers/clk/kendryte/bypass.c b/drivers/clk/kendryte/bypass.c
index 0d8eb1ce331..99f02980f4a 100644
--- a/drivers/clk/kendryte/bypass.c
+++ b/drivers/clk/kendryte/bypass.c
@@ -6,6 +6,7 @@
 #define LOG_CATEGORY UCLASS_CLK
 #include <kendryte/bypass.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <clk-uclass.h>
 #include <linux/clk-provider.h>
diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c
index e8f764d792b..a08a7ae32f6 100644
--- a/drivers/clk/kendryte/clk.c
+++ b/drivers/clk/kendryte/clk.c
@@ -2,9 +2,11 @@
 /*
  * Copyright (C) 2019-20 Sean Anderson <seanga2 at gmail.com>
  */
+#include <stdbool.h>
 #include <kendryte/clk.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <dt-bindings/clock/k210-sysctl.h>
diff --git a/drivers/clk/kendryte/pll.c b/drivers/clk/kendryte/pll.c
index b350a67820f..9eeeb5cbe91 100644
--- a/drivers/clk/kendryte/pll.c
+++ b/drivers/clk/kendryte/pll.c
@@ -3,9 +3,12 @@
  * Copyright (C) 2019-20 Sean Anderson <seanga2 at gmail.com>
  */
 #define LOG_CATEGORY UCLASS_CLK
+#include <compiler.h>
+#include <stdbool.h>
 #include <kendryte/pll.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 /* For DIV_ROUND_DOWN_ULL, defined in linux/kernel.h */
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index 3462b49c69d..6db187b5970 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/arch-mediatek/reset.h>
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c
index 042031dd70f..3ae28639087 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/arch-mediatek/reset.h>
diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index 94b83a53281..249d97b4670 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/arch-mediatek/reset.h>
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index e4217bd9627..0c1d347ad87 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -8,12 +8,14 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index 57a76e69432..6f7000b268d 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -7,6 +7,8 @@
 #ifndef __DRV_CLK_MTK_H
 #define __DRV_CLK_MTK_H
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #define CLK_XTAL			0
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index ddf20ab3d8c..4be6b6dab91 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock-axg.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
@@ -18,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 ef72a416c15..154ec71347f 100644
--- a/drivers/clk/meson/clk_meson.h
+++ b/drivers/clk/meson/clk_meson.h
@@ -10,6 +10,7 @@
 
 /* Gate Structure */
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 struct meson_gate {
 	unsigned int reg;
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index ba9ec818de6..599d6dc57ce 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock-g12a.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
@@ -20,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "clk_meson.h"
 
 /* This driver support only basic clock tree operations :
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 62e8e35d654..af4668e3e42 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/arch/clock-gx.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
@@ -18,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "clk_meson.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index a72cbeb9723..a6d366c8cab 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -19,6 +20,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "mpc83xx_clk.h"
 
diff --git a/drivers/clk/mpc83xx_clk.h b/drivers/clk/mpc83xx_clk.h
index b03b35a8784..b1d32ce8411 100644
--- a/drivers/clk/mpc83xx_clk.h
+++ b/drivers/clk/mpc83xx_clk.h
@@ -5,6 +5,7 @@
  */
 
 /**
+#include <linux/types.h>
  * enum ratio - Description of a core clock ratio
  * @RAT_UNK:      Unknown ratio
  * @RAT_BYP:      Bypass
diff --git a/drivers/clk/mtmips/clk-mt7628.c b/drivers/clk/mtmips/clk-mt7628.c
index 12ae5a92354..ce39cf0b254 100644
--- a/drivers/clk/mtmips/clk-mt7628.c
+++ b/drivers/clk/mtmips/clk-mt7628.c
@@ -7,12 +7,14 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dt-bindings/clock/mt7628-clk.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* SYSCFG0 */
 #define XTAL_40M_SEL			BIT(6)
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 6f279939c51..9d45436b833 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -9,10 +9,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <clk-uclass.h>
 #include <clk.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
@@ -21,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define TBG_SEL		0x0
 #define DIV_SEL0	0x4
diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index 512a1f5824f..d6fa702b24e 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -11,12 +11,14 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define NUM_TBG	    4
 
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index d596c0cf161..eb262e4673d 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "clk_owl.h"
 #include <asm/io.h>
diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h
index a01f81a6a7b..e755b5c5695 100644
--- a/drivers/clk/owl/clk_owl.h
+++ b/drivers/clk/owl/clk_owl.h
@@ -12,6 +12,7 @@
 
 #include <clk-uclass.h>
 #ifndef __ASSEMBLY__
+#include <asm/types.h>
 #include <linux/bitops.h>
 #endif
 
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 52d7bba0cff..943bd6cb4fe 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 c4f5a63b7a3..542f2888f85 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -22,6 +22,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a774a1-cpg-mssr.c b/drivers/clk/renesas/r8a774a1-cpg-mssr.c
index f409e666a97..2f9fc8202d1 100644
--- a/drivers/clk/renesas/r8a774a1-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a774a1-cpg-mssr.c
@@ -14,6 +14,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <dt-bindings/clock/r8a774a1-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index 9eb30d9c9fb..db22f3d05af 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 7ddac6d20ad..4da13cab158 100644
--- a/drivers/clk/renesas/r8a7791-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7791-cpg-mssr.c
@@ -19,6 +19,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0d43004bfc4..9372b8a4111 100644
--- a/drivers/clk/renesas/r8a7792-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7792-cpg-mssr.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 eda0ae0f9d9..d8bdc32773f 100644
--- a/drivers/clk/renesas/r8a7794-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7794-cpg-mssr.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 89794d2cf6c..8ebd256c372 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 029bd54b796..88bd46a0ab2 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -20,6 +20,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 5962cb03d63..ab62e101c03 100644
--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 ec246abf387..dffb663347d 100644
--- a/drivers/clk/renesas/r8a77970-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77970-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0c2050d1b28..41b71fe81ab 100644
--- a/drivers/clk/renesas/r8a77980-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77980-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 e3f62e1bc73..11962516979 100644
--- a/drivers/clk/renesas/r8a77990-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77990-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 25bec5ff1a7..24f6c5b7bb9 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <dt-bindings/clock/r8a77995-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/rcar-gen2-cpg.h b/drivers/clk/renesas/rcar-gen2-cpg.h
index 913c9326203..626fb43654b 100644
--- a/drivers/clk/renesas/rcar-gen2-cpg.h
+++ b/drivers/clk/renesas/rcar-gen2-cpg.h
@@ -11,6 +11,7 @@
 #ifndef __CLK_RENESAS_RCAR_GEN2_CPG_H__
 #define __CLK_RENESAS_RCAR_GEN2_CPG_H__
 
+#include <compiler.h>
 enum rcar_gen2_clk_types {
 	CLK_TYPE_GEN2_MAIN = CLK_TYPE_CUSTOM,
 	CLK_TYPE_GEN2_PLL0,
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h b/drivers/clk/renesas/rcar-gen3-cpg.h
index 102d6955354..95933d11eef 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.h
+++ b/drivers/clk/renesas/rcar-gen3-cpg.h
@@ -11,7 +11,9 @@
 #ifndef __CLK_RENESAS_RCAR_GEN3_CPG_H__
 #define __CLK_RENESAS_RCAR_GEN3_CPG_H__
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 enum rcar_gen3_clk_types {
 	CLK_TYPE_GEN3_MAIN = CLK_TYPE_CUSTOM,
 	CLK_TYPE_GEN3_PLL0,
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 544ea258747..162eb7b32eb 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -11,12 +11,14 @@
  */
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <stdbool.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.h b/drivers/clk/renesas/renesas-cpg-mssr.h
index 70f6fb825c4..81ea356cdfb 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.h
+++ b/drivers/clk/renesas/renesas-cpg-mssr.h
@@ -13,7 +13,9 @@
 #ifndef __DRIVERS_CLK_RENESAS_CPG_MSSR__
 #define __DRIVERS_CLK_RENESAS_CPG_MSSR__
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 struct cpg_mssr_info {
 	const struct cpg_core_clk	*core_clk;
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index 65da88b5109..f55c0147261 100644
--- a/drivers/clk/rockchip/clk_pll.c
+++ b/drivers/clk/rockchip/clk_pll.c
@@ -5,6 +5,7 @@
  #include <common.h>
 #include <bitfield.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
@@ -15,6 +16,7 @@
 #include <div64.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 6e99191007d..cef0f7b2c9a 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index ec60627ddeb..0ce397b9b9e 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 enum {
 	VCO_MAX_HZ	= 2400U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 4dcb85f5109..5a182c2c9db 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/log2.h>
+#include <linux/types.h>
 
 enum {
 	VCO_MAX_HZ	= 2400U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index 7cee0c594f7..3ebcaaffcfd 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
@@ -28,6 +29,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 enum rk3188_clk_type {
 	RK3188_CRU,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index f632dff1a71..b078da27892 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -23,6 +23,7 @@
 #include <linux/log2.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 enum {
 	VCO_MAX_HZ	= 3200U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index ed6b4656e23..a6e145862ff 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <asm/global_data.h>
@@ -33,6 +34,7 @@
 #include <linux/log2.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index 151b6be5ee9..fb5b7d3ad95 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -22,6 +22,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 5879541f3ce..8d831e1bf83 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct pll_div {
 	u32 refdiv;
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index c391ad02100..2e40ca98d33 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -27,6 +27,7 @@
 #include <linux/printk.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
+#include <linux/types.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 1078a4c67b7..3efe5e139a9 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -27,6 +27,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 fcc4ba6d94a..c2708cb48fe 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
index 140433da805..e43f478a6f4 100644
--- a/drivers/clk/sifive/fu540-prci.c
+++ b/drivers/clk/sifive/fu540-prci.c
@@ -29,6 +29,7 @@
  */
 
 #include <common.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
 #include <clk.h>
@@ -40,6 +41,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/math64.h>
 #include <linux/clk/analogbits-wrpll-cln28hpc.h>
diff --git a/drivers/clk/sunxi/clk_a10.c b/drivers/clk/sunxi/clk_a10.c
index 797878eefa9..91e6f10e802 100644
--- a/drivers/clk/sunxi/clk_a10.c
+++ b/drivers/clk/sunxi/clk_a10.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun4i-a10-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 24c20cf11f7..4b6bfd89892 100644
--- a/drivers/clk/sunxi/clk_a10s.c
+++ b/drivers/clk/sunxi/clk_a10s.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun5i-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 312288eef68..7afd0b796bc 100644
--- a/drivers/clk/sunxi/clk_a23.c
+++ b/drivers/clk/sunxi/clk_a23.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 a3b3528abae..ec0592b5ef2 100644
--- a/drivers/clk/sunxi/clk_a31.c
+++ b/drivers/clk/sunxi/clk_a31.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun6i-a31-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 68660cc7ae4..0b974aa07a1 100644
--- a/drivers/clk/sunxi/clk_a64.c
+++ b/drivers/clk/sunxi/clk_a64.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 ea38c819ea7..4e41418ac46 100644
--- a/drivers/clk/sunxi/clk_a80.c
+++ b/drivers/clk/sunxi/clk_a80.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun9i-a80-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 ac82f22c746..0799ec622d0 100644
--- a/drivers/clk/sunxi/clk_a83t.c
+++ b/drivers/clk/sunxi/clk_a83t.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun8i-a83t-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 052fd008f59..bdc7c30c6b3 100644
--- a/drivers/clk/sunxi/clk_h3.c
+++ b/drivers/clk/sunxi/clk_h3.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun8i-h3-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 944aa4c55c4..2c519561f79 100644
--- a/drivers/clk/sunxi/clk_h6.c
+++ b/drivers/clk/sunxi/clk_h6.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun50i-h6-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 1d19c805ade..60ccab43040 100644
--- a/drivers/clk/sunxi/clk_r40.c
+++ b/drivers/clk/sunxi/clk_r40.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun8i-r40-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 1b70f15ab9a..1126dbec05f 100644
--- a/drivers/clk/sunxi/clk_sunxi.c
+++ b/drivers/clk/sunxi/clk_sunxi.c
@@ -10,9 +10,11 @@
 #include <errno.h>
 #include <log.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/ccu.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/log2.h>
diff --git a/drivers/clk/sunxi/clk_v3s.c b/drivers/clk/sunxi/clk_v3s.c
index 19673e43cf0..29ca566164d 100644
--- a/drivers/clk/sunxi/clk_v3s.c
+++ b/drivers/clk/sunxi/clk_v3s.c
@@ -13,6 +13,7 @@
 #include <dt-bindings/reset/sun8i-v3s-ccu.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 d6abf0d6c11..8086116d081 100644
--- a/drivers/clk/tegra/tegra-car-clk.c
+++ b/drivers/clk/tegra/tegra-car-clk.c
@@ -11,6 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int tegra_car_clk_request(struct clk *clk)
 {
diff --git a/drivers/clk/tegra/tegra186-clk.c b/drivers/clk/tegra/tegra186-clk.c
index 5a98a3f3f0e..c1197e7d82d 100644
--- a/drivers/clk/tegra/tegra186-clk.c
+++ b/drivers/clk/tegra/tegra186-clk.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
+#include <linux/types.h>
 
 static ulong tegra186_clk_get_rate(struct clk *clk)
 {
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 72335f271b8..65f6945271c 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdbool.h>
 #include <dm/device_compat.h>
@@ -14,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 #include "clk-uniphier.h"
 
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index 356cf0862a5..6654275a1c9 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <acpi/acpi_device.h>
+#include <asm/types.h>
 #include <dm/acpi.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 0263284fc3f..2f1d0a29b35 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -21,6 +21,7 @@
 #include <dm/util.h>
 #include <power-domain.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int device_chld_unbind(struct udevice *dev, struct driver *drv)
 {
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 8198750cd69..8b47af6eee5 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
@@ -35,6 +36,7 @@
 #include <power-domain.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/core/devres.c b/drivers/core/devres.c
index 9507ecb9a80..eda7dd37ac4 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/compat.h>
 #include <linux/errno.h>
@@ -21,6 +22,7 @@
 #include <dm/devres.h>
 #include <dm/root.h>
 #include <dm/util.h>
+#include <linux/types.h>
 
 /** enum devres_phase - Shows where resource was allocated
  *
diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 3b707eb4933..588ba2b9c02 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -10,6 +10,7 @@
 #include <dm/root.h>
 #include <dm/util.h>
 #include <dm/uclass-internal.h>
+#include <linux/types.h>
 
 static void show_devices(struct udevice *dev, int depth, int last_flag)
 {
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 0cb78d64c5e..ed7a7587df1 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 0ecc90890da..21a51625959 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/bug.h>
@@ -33,6 +34,7 @@
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index a245194db43..52ac82238b0 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -18,6 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Max address size we deal with */
 #define OF_MAX_ADDR_CELLS	4
diff --git a/drivers/core/of_extra.c b/drivers/core/of_extra.c
index f2efc0c8ad9..87e304a78e4 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -13,6 +13,7 @@
 #include <dm/of_extra.h>
 #include <dm/ofnode.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int ofnode_read_fmap_entry(ofnode node, struct fmap_entry *entry)
 {
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index d68be142e68..cb05a7348b1 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -10,6 +10,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
@@ -20,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int ofnode_read_u32(ofnode node, const char *propname, u32 *outp)
 {
diff --git a/drivers/core/read.c b/drivers/core/read.c
index b84c9be2461..f069029136b 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -13,6 +13,7 @@
 #include <asm/types.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int dev_read_u32(const struct udevice *dev, const char *propname, u32 *outp)
 {
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 37fff77dc09..b9ab9051845 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/of_addr.h>
 #include <linux/ioport.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 6eb934c4095..719c9dcb2a9 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -7,10 +7,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -28,6 +30,7 @@
 #include <dm/util.h>
 #include <linux/list.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index aa888b2e0c4..ea98ee17a2f 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct simple_bus_plat {
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index d8d26d772c7..3ab4345455a 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -17,6 +17,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * Caution:
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 242d9f4b30d..54c3fc9b1c8 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -23,6 +23,7 @@
 #include <dm/util.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index 44110e1d8ec..f47a20e7212 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu.h>
 #include <display_options.h>
 #include <dm.h>
@@ -18,6 +19,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define REV_CHIPID_SHIFT		16
 #define REV_CHIPID_MASK			(0xffff << REV_CHIPID_SHIFT)
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 0c660f81227..75a00515047 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -18,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c
index 6f6feee5f2d..856f79b2efe 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -15,6 +15,7 @@
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "mpc83xx_cpu.h"
 
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index 2fd18901dd4..e2f0a28fcaf 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <log.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <linux/bitops.h>
diff --git a/drivers/crypto/ace_sha.h b/drivers/crypto/ace_sha.h
index a671b925b6e..7101b4d415b 100644
--- a/drivers/crypto/ace_sha.h
+++ b/drivers/crypto/ace_sha.h
@@ -8,6 +8,7 @@
 #ifndef __ACE_SHA_H
 #define __ACE_SHA_H
 
+#include <linux/types.h>
 struct exynos_ace_sfr {
 	unsigned int	fc_intstat;	/* base + 0 */
 	unsigned int	fc_intenset;
diff --git a/drivers/crypto/fsl/desc.h b/drivers/crypto/fsl/desc.h
index 3589e6ea024..35f1b1ddaa3 100644
--- a/drivers/crypto/fsl/desc.h
+++ b/drivers/crypto/fsl/desc.h
@@ -1,6 +1,8 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * CAAM descriptor composition header
+#include <compiler.h>
+#include <linux/types.h>
  * Definitions to support CAAM descriptor instruction generation
  *
  * Copyright 2008-2014 Freescale Semiconductor, Inc.
diff --git a/drivers/crypto/fsl/desc_constr.h b/drivers/crypto/fsl/desc_constr.h
index a11ce812d19..0e14ca510d0 100644
--- a/drivers/crypto/fsl/desc_constr.h
+++ b/drivers/crypto/fsl/desc_constr.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  * caam descriptor construction helper functions
  *
  * Copyright 2008-2014 Freescale Semiconductor, Inc.
diff --git a/drivers/crypto/fsl/error.c b/drivers/crypto/fsl/error.c
index a83efe585e6..f23649bf6f2 100644
--- a/drivers/crypto/fsl/error.c
+++ b/drivers/crypto/fsl/error.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include "desc.h"
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index 3cf03106174..e62f4c81833 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -14,6 +14,7 @@
 #include <asm/cache.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "jobdesc.h"
 #include "desc.h"
 #include "jr.h"
diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c
index 5bd6604e777..cdd067582ae 100644
--- a/drivers/crypto/fsl/fsl_hash.c
+++ b/drivers/crypto/fsl/fsl_hash.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "jobdesc.h"
 #include "desc.h"
 #include "jr.h"
diff --git a/drivers/crypto/fsl/fsl_hash.h b/drivers/crypto/fsl/fsl_hash.h
index 82057c83c35..6890536bcc9 100644
--- a/drivers/crypto/fsl/fsl_hash.h
+++ b/drivers/crypto/fsl/fsl_hash.h
@@ -9,6 +9,7 @@
 
 #include <fsl_sec.h>
 #include <hash.h>
+#include <linux/types.h>
 #include "jr.h"
 
 /* We support at most 32 Scatter/Gather Entries.*/
diff --git a/drivers/crypto/fsl/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c
index 2658f8c0434..a26d68932c9 100644
--- a/drivers/crypto/fsl/fsl_rsa.c
+++ b/drivers/crypto/fsl/fsl_rsa.c
@@ -11,6 +11,7 @@
 #include <asm/types.h>
 #include <malloc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "jobdesc.h"
 #include "desc.h"
 #include "jr.h"
diff --git a/drivers/crypto/fsl/jobdesc.c b/drivers/crypto/fsl/jobdesc.c
index 40f06e8f81b..359f127561b 100644
--- a/drivers/crypto/fsl/jobdesc.c
+++ b/drivers/crypto/fsl/jobdesc.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
+#include <linux/types.h>
  * SEC Descriptor Construction Library
  * Basic job descriptor construction
  *
diff --git a/drivers/crypto/fsl/jobdesc.h b/drivers/crypto/fsl/jobdesc.h
index c4501abd26b..7aa4cb2f58f 100644
--- a/drivers/crypto/fsl/jobdesc.h
+++ b/drivers/crypto/fsl/jobdesc.h
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/types.h>
 #include "rsa_caam.h"
 
 #define KEY_IDNFR_SZ_BYTES		16
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index 9ac4817d448..fda540388bd 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <stdio.h>
 #include <linux/errno.h>
@@ -13,6 +14,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "fsl_sec.h"
 #include "jr.h"
 #include "jobdesc.h"
diff --git a/drivers/crypto/fsl/jr.h b/drivers/crypto/fsl/jr.h
index ffd3a192738..1006ce12d55 100644
--- a/drivers/crypto/fsl/jr.h
+++ b/drivers/crypto/fsl/jr.h
@@ -7,7 +7,9 @@
 #ifndef __JR_H
 #define __JR_H
 
+#include <compiler.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 #define JR_SIZE 4
 /* Timeout currently defined as 90 sec */
diff --git a/drivers/crypto/fsl/rng.c b/drivers/crypto/fsl/rng.c
index 77f8e8a055f..19c6f9d5b91 100644
--- a/drivers/crypto/fsl/rng.c
+++ b/drivers/crypto/fsl/rng.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "desc_constr.h"
 #include "jobdesc.h"
 #include "jr.h"
diff --git a/drivers/crypto/fsl/rsa_caam.h b/drivers/crypto/fsl/rsa_caam.h
index 9a6a8afa4aa..8e39607b932 100644
--- a/drivers/crypto/fsl/rsa_caam.h
+++ b/drivers/crypto/fsl/rsa_caam.h
@@ -7,6 +7,7 @@
 #define __RSA_CAAM_H
 
 #include <common.h>
+#include <linux/types.h>
 
 /**
  * struct pk_in_params - holder for input to PKHA block in CAAM
diff --git a/drivers/crypto/fsl/sec.c b/drivers/crypto/fsl/sec.c
index 4e52852d64b..32cfafea679 100644
--- a/drivers/crypto/fsl/sec.c
+++ b/drivers/crypto/fsl/sec.c
@@ -4,8 +4,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
index 4ce85b32244..359470e1cc4 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/types.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/crypto/rsa_mod_exp/mod_exp_uclass.c b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
index 6826011fb31..4fee492f090 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <u-boot/rsa-mod-exp.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index 8cc648bc98e..539fdf90afa 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -15,6 +15,7 @@
 #include <reset.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include "sdram_soc64.h"
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 7d51bfd83c5..23ca7bcc160 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -21,6 +21,7 @@
 #include <asm/arch/misc.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/sdram.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index 723436cadca..30adfe61cdc 100644
--- a/drivers/ddr/altera/sdram_gen5.c
+++ b/drivers/ddr/altera/sdram_gen5.c
@@ -18,6 +18,7 @@
 #include <asm/arch/system_manager.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 8fe96ee2465..e0c4b87514c 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include "sdram_s10.h"
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 67fc9c14e3f..b4823503c01 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -18,6 +19,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/ddr/altera/sdram_soc64.h b/drivers/ddr/altera/sdram_soc64.h
index 4a830e7ec18..d7a5a57b0e2 100644
--- a/drivers/ddr/altera/sdram_soc64.h
+++ b/drivers/ddr/altera/sdram_soc64.h
@@ -7,6 +7,8 @@
 #define	_SDRAM_SOC64_H_
 
 #include <common.h>
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/sizes.h>
 
 struct altera_sdram_priv {
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index aad40ad398d..861e0282f9f 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -5,10 +5,12 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <asm/arch/sdram.h>
 #include <errno.h>
 #include <hang.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/ddr/altera/sequencer.h b/drivers/ddr/altera/sequencer.h
index b655c25688d..72236531cce 100644
--- a/drivers/ddr/altera/sequencer.h
+++ b/drivers/ddr/altera/sequencer.h
@@ -7,6 +7,7 @@
 #define _SEQUENCER_H_
 
 #include <stdbool.h>
+#include <linux/types.h>
 #define RW_MGR_NUM_DM_PER_WRITE_GROUP (seq->rwcfg->mem_data_mask_width \
 	/ seq->rwcfg->mem_if_write_dqs_width)
 #define RW_MGR_NUM_TRUE_DM_PER_WRITE_GROUP ( \
diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c
index 2f503b1a101..bd35b6a345e 100644
--- a/drivers/ddr/fsl/arm_ddr_gen3.c
+++ b/drivers/ddr/fsl/arm_ddr_gen3.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
@@ -14,6 +15,7 @@
 #include <fsl_immap.h>
 #include <fsl_ddr.h>
 #include <asm/arch/clock.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index e6f85dcf623..2405ce77938 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -11,11 +11,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_errata.h>
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -23,6 +25,7 @@
 	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/ddr/fsl/ddr3_dimm_params.c b/drivers/ddr/fsl/ddr3_dimm_params.c
index b3e42519e86..6833b981ce8 100644
--- a/drivers/ddr/fsl/ddr3_dimm_params.c
+++ b/drivers/ddr/fsl/ddr3_dimm_params.c
@@ -12,6 +12,7 @@
 #include <fsl_ddr_sdram.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include <fsl_ddr.h>
diff --git a/drivers/ddr/fsl/ddr4_dimm_params.c b/drivers/ddr/fsl/ddr4_dimm_params.c
index fca5b433eb1..251facdb858 100644
--- a/drivers/ddr/fsl/ddr4_dimm_params.c
+++ b/drivers/ddr/fsl/ddr4_dimm_params.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bug.h>
 #include <linux/string.h>
 
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index fceae90414c..314418ece04 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <stdio.h>
@@ -17,6 +18,7 @@
 	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/drivers/ddr/fsl/fsl_mmdc.c b/drivers/ddr/fsl/fsl_mmdc.c
index b88c65cd2e4..51c078f0008 100644
--- a/drivers/ddr/fsl/fsl_mmdc.c
+++ b/drivers/ddr/fsl/fsl_mmdc.c
@@ -11,6 +11,7 @@
 #include <fsl_mmdc.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.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 c7d99077d86..f8209d3aa86 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr.h>
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 56c0de2004c..45c50331b36 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <dm.h>
 #include <i2c.h>
@@ -17,11 +18,13 @@
 #include <fsl_ddr.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 091d7582f95..e9b829af512 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
index 7fc264aa936..91c4e6fb4cc 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.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 cbe434a1a6a..b7ee440ef97 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/drivers/ddr/fsl/mpc86xx_ddr.c b/drivers/ddr/fsl/mpc86xx_ddr.c
index a57cfec5b8c..2793e2b1bac 100644
--- a/drivers/ddr/fsl/mpc86xx_ddr.c
+++ b/drivers/ddr/fsl/mpc86xx_ddr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 87d720afcbb..4e65c4f4089 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <hwconfig.h>
 #include <fsl_ddr_sdram.h>
@@ -12,6 +13,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
+#include <linux/types.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 45d641ec60f..ab1a2d76b90 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -7,11 +7,13 @@
 #ifdef CONFIG_PPC
 #include <asm/fsl_law.h>
 #endif
+#include <compiler.h>
 #include <div64.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c
index 99a67edfb0a..45a6878cb51 100644
--- a/drivers/ddr/imx/imx8m/ddr_init.c
+++ b/drivers/ddr/imx/imx8m/ddr_init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <log.h>
 #include <asm/io.h>
diff --git a/drivers/ddr/imx/imx8m/ddrphy_csr.c b/drivers/ddr/imx/imx8m/ddrphy_csr.c
index 67dd4e7059f..7cbd0ba8200 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_csr.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_csr.c
@@ -5,6 +5,7 @@
 
 #include <linux/kernel.h>
 #include <asm/arch/ddr.h>
+#include <linux/types.h>
 
 /* ddr phy trained csr */
 struct dram_cfg_param ddrphy_trained_csr[] = {
diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c
index 20ae47bfb52..fcb634b3f0c 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c
@@ -12,6 +12,7 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/lpddr4_define.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 
 static unsigned int g_cdd_rr_max[4];
 static unsigned int g_cdd_rw_max[4];
diff --git a/drivers/ddr/imx/imx8m/helper.c b/drivers/ddr/imx/imx8m/helper.c
index fca733ee3b2..cd6d0c37204 100644
--- a/drivers/ddr/imx/imx8m/helper.c
+++ b/drivers/ddr/imx/imx8m/helper.c
@@ -15,6 +15,7 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/lpddr4_define.h>
 #include <asm/sections.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ddr/marvell/a38x/ddr3_logging_def.h b/drivers/ddr/marvell/a38x/ddr3_logging_def.h
index ad9da1cfffb..9c34054a797 100644
--- a/drivers/ddr/marvell/a38x/ddr3_logging_def.h
+++ b/drivers/ddr/marvell/a38x/ddr3_logging_def.h
@@ -71,6 +71,7 @@
 	if (level >= debug_training_access)	\
 		printf s
 #endif
+#include <asm/types.h>
 #endif
 
 
diff --git a/drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h b/drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h
index 1e2260b8710..39fa8525819 100644
--- a/drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h
+++ b/drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h
@@ -6,6 +6,7 @@
 #ifndef __DDR3_PATTERNS_64_H
 #define __DDR3_PATTERNS_64_H
 
+#include <asm/types.h>
 #define FAB_OPT		21
 /*
  * Patterns Declerations
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h b/drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h
index fe0436668e9..6dba8575281 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h
+++ b/drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h
@@ -6,6 +6,7 @@
 #ifndef _DDR3_TRAINING_HW_ALGO_H_
 #define _DDR3_TRAINING_HW_ALGO_H_
 
+#include <asm/types.h>
 int ddr3_tip_vref(u32 dev_num);
 int ddr3_tip_write_additional_odt_setting(u32 dev_num, u32 if_id);
 int ddr3_tip_cmd_addr_init_delay(u32 dev_num, u32 adll_tap);
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h b/drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h
index 392842a102d..319fe1eebe6 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h
+++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h
@@ -6,6 +6,7 @@
 #ifndef _DDR3_TRAINING_IP_CENTRALIZATION_H
 #define _DDR3_TRAINING_IP_CENTRALIZATION_H
 
+#include <asm/types.h>
 int ddr3_tip_centralization_tx(u32 dev_num);
 int ddr3_tip_centralization_rx(u32 dev_num);
 int ddr3_tip_print_centralization_result(u32 dev_num);
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_db.h b/drivers/ddr/marvell/a38x/ddr3_training_ip_db.h
index e28b7ecee15..a1cb285a2cf 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_ip_db.h
+++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_db.h
@@ -6,6 +6,7 @@
 #ifndef _DDR3_TRAINING_IP_DB_H_
 #define _DDR3_TRAINING_IP_DB_H_
 
+#include <asm/types.h>
 enum hws_pattern {
 	PATTERN_PBS1,
 	PATTERN_PBS2,
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h b/drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h
index 323c67aa591..1a8d9d1ad89 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h
+++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h
@@ -6,6 +6,7 @@
 #ifndef _DDR3_TRAINING_IP_PBS_H_
 #define _DDR3_TRAINING_IP_PBS_H_
 
+#include <asm/types.h>
 enum {
 	EBA_CONFIG,
 	EEBA_CONFIG,
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_leveling.h b/drivers/ddr/marvell/a38x/ddr3_training_leveling.h
index 6719fb83f51..73851570e0a 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_leveling.h
+++ b/drivers/ddr/marvell/a38x/ddr3_training_leveling.h
@@ -6,6 +6,7 @@
 #ifndef _DDR3_TRAINING_LEVELING_H_
 #define _DDR3_TRAINING_LEVELING_H_
 
+#include <asm/types.h>
 #define MAX_DQ_READ_LEVELING_DELAY 15
 
 int ddr3_tip_print_wl_supp_result(u32 dev_num);
diff --git a/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h b/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h
index 688cbbeefc5..88beb5c8312 100644
--- a/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h
+++ b/drivers/ddr/marvell/a38x/ddr_ml_wrapper.h
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #if defined(CONFIG_ARMADA_38X) || defined(CONFIG_ARMADA_39X)
 #define INTER_REGS_BASE	SOC_REGS_PHY_BASE
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_common.h b/drivers/ddr/marvell/a38x/mv_ddr_common.h
index 321a390c0d3..109d3e17090 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_common.h
+++ b/drivers/ddr/marvell/a38x/mv_ddr_common.h
@@ -6,6 +6,7 @@
 #ifndef _MV_DDR_COMMON_H
 #define _MV_DDR_COMMON_H
 
+#include <linux/types.h>
 extern const char mv_ddr_build_message[];
 extern const char mv_ddr_version_string[];
 
diff --git a/drivers/ddr/marvell/a38x/seq_exec.h b/drivers/ddr/marvell/a38x/seq_exec.h
index fe0cb8f75df..71b3a75fb83 100644
--- a/drivers/ddr/marvell/a38x/seq_exec.h
+++ b/drivers/ddr/marvell/a38x/seq_exec.h
@@ -6,6 +6,7 @@
 #ifndef _SEQ_EXEC_H
 #define _SEQ_EXEC_H
 
+#include <asm/types.h>
 #define NA			0xff
 #define DEFAULT_PARAM		0
 #define MV_BOARD_TCLK_ERROR	0xffffffff
diff --git a/drivers/ddr/marvell/a38x/xor.h b/drivers/ddr/marvell/a38x/xor.h
index 1e026503693..59a7bafa5ab 100644
--- a/drivers/ddr/marvell/a38x/xor.h
+++ b/drivers/ddr/marvell/a38x/xor.h
@@ -6,6 +6,7 @@
 #ifndef _XOR_H
 #define _XOR_H
 
+#include <asm/types.h>
 #define SRAM_BASE		0x40000000
 
 #define MV_XOR_MAX_UNIT		2	/* XOR unit == XOR engine */
diff --git a/drivers/ddr/marvell/axp/ddr3_dfs.c b/drivers/ddr/marvell/axp/ddr3_dfs.c
index 86abdf70db7..e118b44e4d0 100644
--- a/drivers/ddr/marvell/axp/ddr3_dfs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dfs.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.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 33187fbc64f..0f662d1fab4 100644
--- a/drivers/ddr/marvell/axp/ddr3_dqs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dqs.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "ddr3_hw_training.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_hw_training.c b/drivers/ddr/marvell/axp/ddr3_hw_training.c
index cc36f29ff86..a4771fbd46d 100644
--- a/drivers/ddr/marvell/axp/ddr3_hw_training.c
+++ b/drivers/ddr/marvell/axp/ddr3_hw_training.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/drivers/ddr/marvell/axp/ddr3_init.c b/drivers/ddr/marvell/axp/ddr3_init.c
index f934957a0f3..b30a43ee680 100644
--- a/drivers/ddr/marvell/axp/ddr3_init.c
+++ b/drivers/ddr/marvell/axp/ddr3_init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <log.h>
 #include <spl.h>
@@ -11,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include "ddr3_init.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_patterns_64bit.h b/drivers/ddr/marvell/axp/ddr3_patterns_64bit.h
index 00dc9e3559a..b5b91cd0f0b 100644
--- a/drivers/ddr/marvell/axp/ddr3_patterns_64bit.h
+++ b/drivers/ddr/marvell/axp/ddr3_patterns_64bit.h
@@ -10,6 +10,7 @@
  * Patterns Declerations
  */
 
+#include <asm/types.h>
 u32 wl_sup_pattern[LEN_WL_SUP_PATTERN] __aligned(32) = {
 	0x04030201, 0x08070605, 0x0c0b0a09, 0x100f0e0d,
 	0x14131211, 0x18171615, 0x1c1b1a19, 0x201f1e1d,
diff --git a/drivers/ddr/marvell/axp/ddr3_pbs.c b/drivers/ddr/marvell/axp/ddr3_pbs.c
index dd7905dd7f4..adcdc91b939 100644
--- a/drivers/ddr/marvell/axp/ddr3_pbs.c
+++ b/drivers/ddr/marvell/axp/ddr3_pbs.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/drivers/ddr/marvell/axp/ddr3_read_leveling.c b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
index 03dae99107a..3d4992f9160 100644
--- a/drivers/ddr/marvell/axp/ddr3_read_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "ddr3_hw_training.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_sdram.c b/drivers/ddr/marvell/axp/ddr3_sdram.c
index 3a266c6de45..3fb1f89a090 100644
--- a/drivers/ddr/marvell/axp/ddr3_sdram.c
+++ b/drivers/ddr/marvell/axp/ddr3_sdram.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "ddr3_hw_training.h"
 #include "xor.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_spd.c b/drivers/ddr/marvell/axp/ddr3_spd.c
index d58d4961658..f35df5a7e95 100644
--- a/drivers/ddr/marvell/axp/ddr3_spd.c
+++ b/drivers/ddr/marvell/axp/ddr3_spd.c
@@ -12,6 +12,7 @@
 #include <asm/arch/soc.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ddr3_init.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_write_leveling.c b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
index 8c875287b4c..c3c0a87ac45 100644
--- a/drivers/ddr/marvell/axp/ddr3_write_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/drivers/ddr/marvell/axp/xor.c b/drivers/ddr/marvell/axp/xor.c
index 17bfe6a7bf3..9c323685dc8 100644
--- a/drivers/ddr/marvell/axp/xor.c
+++ b/drivers/ddr/marvell/axp/xor.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 
 #include "xor.h"
 #include "xor_regs.h"
diff --git a/drivers/ddr/microchip/ddr2.c b/drivers/ddr/microchip/ddr2.c
index 90ebf4642d5..0dd725c4ac1 100644
--- a/drivers/ddr/microchip/ddr2.c
+++ b/drivers/ddr/microchip/ddr2.c
@@ -4,8 +4,10 @@
  *
  */
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <wait_bit.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/bitops.h>
 #include <mach/pic32.h>
diff --git a/drivers/ddr/microchip/ddr2_regs.h b/drivers/ddr/microchip/ddr2_regs.h
index 0734585dc2f..5c3b70fc3ce 100644
--- a/drivers/ddr/microchip/ddr2_regs.h
+++ b/drivers/ddr/microchip/ddr2_regs.h
@@ -7,6 +7,7 @@
 #ifndef __MICROCHIP_DDR2_REGS_H
 #define __MICROCHIP_DDR2_REGS_H
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /* DDR2 Controller */
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index 1be18905890..d9e61029e39 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/demo/demo-simple.c b/drivers/demo/demo-simple.c
index 325f653877f..e02dde63d6c 100644
--- a/drivers/demo/demo-simple.c
+++ b/drivers/demo/demo-simple.c
@@ -12,6 +12,7 @@
 #include <mapmem.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 static int simple_hello(struct udevice *dev, int ch)
 {
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index b9d1dcbc1d2..7df96cd136f 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <errno.h>
 #include <log.h>
@@ -15,6 +16,7 @@
 #include <fat.h>
 #include <dfu.h>
 #include <hash.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
@@ -23,6 +25,7 @@
 #include <linux/compiler.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static LIST_HEAD(dfu_list);
 static int dfu_alt_num;
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 4431e34c10e..e4894c5968d 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -22,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static unsigned char *dfu_file_buf;
 static u64 dfu_file_buf_len;
diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c
index 7e5623674ca..9b850560721 100644
--- a/drivers/dfu/dfu_mtd.c
+++ b/drivers/dfu/dfu_mtd.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dfu.h>
 #include <mtd.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <jffs2/load_kernel.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static bool mtd_is_aligned_with_block_size(struct mtd_info *mtd, u64 size)
 {
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
index 848a9d81d11..e4bcdde8668 100644
--- a/drivers/dfu/dfu_nand.c
+++ b/drivers/dfu/dfu_nand.c
@@ -21,6 +21,7 @@
 #include <jffs2/load_kernel.h>
 #include <nand.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu,
 			u64 offset, void *buf, long *len)
diff --git a/drivers/dfu/dfu_ram.c b/drivers/dfu/dfu_ram.c
index 55c3dc9eb19..ac07730b84c 100644
--- a/drivers/dfu/dfu_ram.c
+++ b/drivers/dfu/dfu_ram.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int dfu_transfer_medium_ram(enum dfu_op op, struct dfu_entity *dfu,
 				   u64 offset, void *buf, long *len)
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index 3d0a4f98971..af4a90a8b42 100644
--- a/drivers/dfu/dfu_sf.c
+++ b/drivers/dfu/dfu_sf.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int dfu_get_medium_size_sf(struct dfu_entity *dfu, u64 *size)
 {
diff --git a/drivers/dfu/dfu_tftp.c b/drivers/dfu/dfu_tftp.c
index 61efb11a545..d90a1a2f38e 100644
--- a/drivers/dfu/dfu_tftp.c
+++ b/drivers/dfu/dfu_tftp.c
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int dfu_tftp_write(char *dfu_entity_name, unsigned int addr, unsigned int len,
 		   char *interface, char *devstring)
diff --git a/drivers/dfu/dfu_virt.c b/drivers/dfu/dfu_virt.c
index 4d9a56bbf5c..7b47c1eed26 100644
--- a/drivers/dfu/dfu_virt.c
+++ b/drivers/dfu/dfu_virt.c
@@ -3,11 +3,13 @@
  * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
  */
 #include <common.h>
+#include <compiler.h>
 #include <dfu.h>
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 int __weak dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
 				 void *buf, long *len)
diff --git a/drivers/dma/MCD_dmaApi.c b/drivers/dma/MCD_dmaApi.c
index d3c79e122cb..feee0a5421a 100644
--- a/drivers/dma/MCD_dmaApi.c
+++ b/drivers/dma/MCD_dmaApi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 #include <MCD_dma.h>
 #include <MCD_tasksInit.h>
diff --git a/drivers/dma/MCD_tasks.c b/drivers/dma/MCD_tasks.c
index 453d95413da..9d320ea1dcd 100644
--- a/drivers/dma/MCD_tasks.c
+++ b/drivers/dma/MCD_tasks.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  */
 
+#include <asm/types.h>
 /* Contains task code and structures for Multi-channel DMA */
 
 #include <common.h>
diff --git a/drivers/dma/MCD_tasksInit.c b/drivers/dma/MCD_tasksInit.c
index 079cd0af3c0..20ad4c241ca 100644
--- a/drivers/dma/MCD_tasksInit.c
+++ b/drivers/dma/MCD_tasksInit.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 /* Functions for initializing variable tables of different types of tasks. */
 
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 697db0d7201..967c614c852 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <common.h>
 #include <malloc.h>
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index e6fc0ac5ffb..43b93b26b33 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <dma-uclass.h>
@@ -31,6 +32,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 8a6fd825b13..62f3d60465c 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DMA_CHANNELS
 static inline struct dma_ops *dma_dev_ops(struct udevice *dev)
diff --git a/drivers/dma/fsl_dma.c b/drivers/dma/fsl_dma.c
index e46544c877b..e230c49d26a 100644
--- a/drivers/dma/fsl_dma.c
+++ b/drivers/dma/fsl_dma.c
@@ -14,6 +14,7 @@
 #include <asm/fsl_dma.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Controller can only transfer 2^26 - 1 bytes at a time */
 #define FSL_DMA_MAX_SIZE	(0x3ffffff)
diff --git a/drivers/dma/keystone_nav.c b/drivers/dma/keystone_nav.c
index 72b0a7736fc..7dedd52698e 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 <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/drivers/dma/keystone_nav_cfg.c b/drivers/dma/keystone_nav_cfg.c
index 9a64801cf9b..cd84b42b954 100644
--- a/drivers/dma/keystone_nav_cfg.c
+++ b/drivers/dma/keystone_nav_cfg.c
@@ -7,6 +7,7 @@
  */
 
 #include <asm/ti-common/keystone_nav.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_KSNAV_PKTDMA_NETCP
 /* NETCP Pktdma */
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index 7078d3e7c6a..996fc1bdc85 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index 460197ed67a..b5a37c74d5a 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SANDBOX_DMA_CH_CNT 3
 #define SANDBOX_DMA_BUF_SIZE 1024
diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c
index aba4efc15c2..878dbdfe59e 100644
--- a/drivers/dma/ti-edma3.c
+++ b/drivers/dma/ti-edma3.c
@@ -17,6 +17,7 @@
 #include <asm/ti-common/ti-edma3.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define EDMA3_SL_BASE(slot)			(0x4000 + ((slot) << 5))
 #define EDMA3_SL_MAX_NUM			512
diff --git a/drivers/dma/ti/k3-psil.c b/drivers/dma/ti/k3-psil.c
index 56da1e605c3..783a413b387 100644
--- a/drivers/dma/ti/k3-psil.c
+++ b/drivers/dma/ti/k3-psil.c
@@ -4,6 +4,7 @@
  *  Author: Peter Ujfalusi <peter.ujfalusi at ti.com>
  */
 
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/err.h>
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 4d50dbc76e5..1f4b16782a6 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -6,8 +6,10 @@
 #define pr_fmt(fmt) "udma: " fmt
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -34,6 +36,7 @@
 #include <linux/soc/ti/ti-udma.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "k3-udma-hwdef.h"
 #include "k3-psil-priv.h"
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 966c0024579..b3db6a84aa1 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/printk.h>
 #include <linux/string.h>
 
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 74a5bce22f7..3a4d020e3fa 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -12,11 +12,13 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <fastboot.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <net/fastboot.h>
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 5c188e1b5b5..ee9df2e102a 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static void getvar_version(char *var_parameter, char *response);
 static void getvar_version_bootloader(char *var_parameter, char *response);
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 5615dffa6d8..185fd81d495 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define FASTBOOT_MAX_BLK_WRITE 16384
 
diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index 074aa2aeb2b..1b89d25d3a6 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -4,6 +4,7 @@
  * Copyright 2015 Free Electrons.
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <blk.h>
@@ -12,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <fastboot.h>
 #include <image-sparse.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 0a815ec736a..4082675ad91 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -15,6 +15,7 @@
 #include <asm/ptrace.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_ZYNQMP_IPI)
 #include <mailbox.h>
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index e156d549268..17e739463a8 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <mailbox.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <dm/device.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
@@ -24,6 +25,7 @@
 #include <linux/soc/ti/k3-sec-proxy.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ti_sci.h"
 
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index 327bb820f3a..341f727f0b7 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -15,6 +15,8 @@
 #define __TI_SCI_H
 
 /* Generic Messages */
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #define TI_SCI_MSG_ENABLE_WDT		0x0000
 #define TI_SCI_MSG_WAKE_RESET		0x0001
diff --git a/drivers/fpga/ACEX1K.c b/drivers/fpga/ACEX1K.c
index 6c5097d94c7..6cbcf1aa1bc 100644
--- a/drivers/fpga/ACEX1K.c
+++ b/drivers/fpga/ACEX1K.c
@@ -12,6 +12,7 @@
 #include <ACEX1K.h>		/* ACEX device family */
 #include <time.h>
 #include <linux/delay.h>
+#include <linux/types.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 4ce9a0581ad..f63fc0b2ed6 100644
--- a/drivers/fpga/altera.c
+++ b/drivers/fpga/altera.c
@@ -18,6 +18,7 @@
 #include <stratixII.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Define FPGA_DEBUG to 1 to get debug printf's */
 #define FPGA_DEBUG	0
diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c
index de0880ff3d8..d85c6601ee2 100644
--- a/drivers/fpga/cyclon2.c
+++ b/drivers/fpga/cyclon2.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <linux/delay.h>
+#include <linux/types.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 1d76e123212..b4ee5235b41 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -6,6 +6,7 @@
 
 /* Generic FPGA support */
 #include <common.h>             /* core U-Boot definitions */
+#include <compiler.h>
 #include <init.h>
 #include <log.h>
 #include <stdio.h>
@@ -14,6 +15,7 @@
 #include <lattice.h>
 #include <dm/device_compat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Local definitions */
 #ifndef CONFIG_MAX_FPGA_DEVICES
diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c
index cbdf00d3a2e..b88d5c222ba 100644
--- a/drivers/fpga/lattice.c
+++ b/drivers/fpga/lattice.c
@@ -17,6 +17,7 @@
 #include <lattice.h>
 #include <stdio.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 static lattice_board_specific_func *pfns;
 static const char *fpga_image;
diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 357c74675d1..75e5d9479f1 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -11,6 +11,7 @@
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Timeout count */
 #define FPGA_TIMEOUT_CNT		0x1000000
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 360f064dbae..ab02d9d783d 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -26,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define CFGWDTH_32	1
 #define MIN_BITSTREAM_SIZECHECK	230
diff --git a/drivers/fpga/socfpga_gen5.c b/drivers/fpga/socfpga_gen5.c
index 1edd494a5b0..9e7b6232560 100644
--- a/drivers/fpga/socfpga_gen5.c
+++ b/drivers/fpga/socfpga_gen5.c
@@ -11,6 +11,7 @@
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
+#include <linux/types.h>
 
 #define FPGA_TIMEOUT_CNT	0x1000000
 
diff --git a/drivers/fpga/spartan2.c b/drivers/fpga/spartan2.c
index 355104f77d9..4f131ade668 100644
--- a/drivers/fpga/spartan2.c
+++ b/drivers/fpga/spartan2.c
@@ -7,6 +7,7 @@
 #include <common.h>		/* core U-Boot definitions */
 #include <spartan2.h>		/* Spartan-II device family */
 #include <time.h>
+#include <linux/types.h>
 
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef	FPGA_DEBUG
diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
index 7374bb6f6b9..6975f6c3554 100644
--- a/drivers/fpga/spartan3.c
+++ b/drivers/fpga/spartan3.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
+#include <linux/types.h>
 
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef	FPGA_DEBUG
diff --git a/drivers/fpga/stratix10.c b/drivers/fpga/stratix10.c
index 3477ddbfd6b..cf3214d8240 100644
--- a/drivers/fpga/stratix10.c
+++ b/drivers/fpga/stratix10.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 b450a81072e..d0b5645e121 100644
--- a/drivers/fpga/stratixII.c
+++ b/drivers/fpga/stratixII.c
@@ -7,6 +7,7 @@
 #include <common.h>		/* core U-Boot definitions */
 #include <altera.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
 			   int isSerial, int isSecure);
diff --git a/drivers/fpga/stratixv.c b/drivers/fpga/stratixv.c
index 403865c1e37..5becb528dc0 100644
--- a/drivers/fpga/stratixv.c
+++ b/drivers/fpga/stratixv.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Write the RBF data to FPGA via SPI */
 static int program_write(int spi_bus, int spi_dev, const void *rbf_data,
diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c
index eeaa8e0a335..94d4788ffbf 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -15,6 +15,7 @@
 #include <asm/cache.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static ulong versal_align_dma_buffer(ulong *buf, u32 len)
 {
diff --git a/drivers/fpga/virtex2.c b/drivers/fpga/virtex2.c
index c6449cfc60f..e234c63eb3b 100644
--- a/drivers/fpga/virtex2.c
+++ b/drivers/fpga/virtex2.c
@@ -18,6 +18,7 @@
 #include <time.h>
 #include <virtex2.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #if 0
 #define FPGA_DEBUG
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 30259607410..dc1d1c5fa09 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -20,6 +20,7 @@
 #include <spartan3.h>
 #include <zynqpl.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Local Static Functions */
 static int xilinx_validate(xilinx_desc *desc, char *fn);
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index 9d3eb848266..3a84e7f26ef 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -10,6 +10,7 @@
 #include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
@@ -19,6 +20,7 @@
 #include <linux/sizes.h>
 #include <asm/arch/sys_proto.h>
 #include <memalign.h>
+#include <linux/types.h>
 
 #define DUMMY_WORD	0xffffffff
 
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index c887f3ddca6..6bb1e44fab1 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -21,6 +21,7 @@
 #include <linux/sizes.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 #define DEVCFG_CTRL_PCFG_PROG_B		0x40000000
 #define DEVCFG_CTRL_PCFG_AES_EFUSE_MASK	0x00001000
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c
index a6d360a04e1..860c62903ea 100644
--- a/drivers/gpio/74x164_gpio.c
+++ b/drivers/gpio/74x164_gpio.c
@@ -22,6 +22,7 @@
 #include <spi.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c
index fc508093d6f..11c6b709e46 100644
--- a/drivers/gpio/adi_gpio2.c
+++ b/drivers/gpio/adi_gpio2.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index e52124dbd50..3609cc29380 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index f808f5114b7..c1cfd0e1c11 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -19,6 +19,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pio.h>
+#include <linux/types.h>
 
 #define GPIO_PER_BANK	32
 
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 9b291ae976a..e9925e815d4 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <mach/gpio.h>
 #include <mach/atmel_pio4.h>
 
diff --git a/drivers/gpio/axp_gpio.c b/drivers/gpio/axp_gpio.c
index 76008670e0b..31f15a47129 100644
--- a/drivers/gpio/axp_gpio.c
+++ b/drivers/gpio/axp_gpio.c
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <axp_pmic.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/root.h>
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index c7d120246fc..f66554912c9 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <errno.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
index 9b0f551b950..9f13543682c 100644
--- a/drivers/gpio/bcm6345_gpio.c
+++ b/drivers/gpio/bcm6345_gpio.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <stdbool.h>
diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c
index 3b093c87568..5e7ca9de4a8 100644
--- a/drivers/gpio/cortina_gpio.c
+++ b/drivers/gpio/cortina_gpio.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/da8xx_gpio.h b/drivers/gpio/da8xx_gpio.h
index 849e8d2dcf3..81e0ab63028 100644
--- a/drivers/gpio/da8xx_gpio.h
+++ b/drivers/gpio/da8xx_gpio.h
@@ -3,6 +3,7 @@
 #ifndef _GPIO_DA8XX_DEFS_H_
 #define _GPIO_DA8XX_DEFS_H_
 
+#include <linux/types.h>
 struct davinci_gpio {
 	unsigned int dir;
 	unsigned int out_data;
diff --git a/drivers/gpio/db8500_gpio.c b/drivers/gpio/db8500_gpio.c
index 4e79571aa4e..18ab33b8060 100644
--- a/drivers/gpio/db8500_gpio.c
+++ b/drivers/gpio/db8500_gpio.c
@@ -17,8 +17,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include <asm/arch/db8500_gpio.h>
 #include <asm/arch/db8500_pincfg.h>
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 3ab3b399c6b..4dc347a2315 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -12,6 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index a940b9969c1..b7328856688 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -5,10 +5,12 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <malloc.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <errno.h>
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index 13f525823ec..86fa2534787 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <stdbool.h>
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 68320c1e27c..7714fe9375e 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -25,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 54a38da0f10..f693700c9db 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -5,7 +5,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/drivers/gpio/hi6220_gpio.c b/drivers/gpio/hi6220_gpio.c
index eb369195c8d..f41af01fd97 100644
--- a/drivers/gpio/hi6220_gpio.c
+++ b/drivers/gpio/hi6220_gpio.c
@@ -10,6 +10,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 82ce0a813ba..75c686e4deb 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index fe171af18c5..807f06c9c4b 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c
index 4fc345c755e..af68d1161ef 100644
--- a/drivers/gpio/intel_broadwell_gpio.c
+++ b/drivers/gpio/intel_broadwell_gpio.c
@@ -19,6 +19,7 @@
 #include <asm/arch/gpio.h>
 #include <dt-bindings/gpio/x86-gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c
index 360ec685249..6075f23d184 100644
--- a/drivers/gpio/intel_gpio.c
+++ b/drivers/gpio/intel_gpio.c
@@ -24,6 +24,7 @@
 #include <dt-bindings/gpio/x86-gpio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int intel_gpio_direction_input(struct udevice *dev, uint offset)
 {
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c
index be371fdcc30..4b57a34eae4 100644
--- a/drivers/gpio/intel_ich6_gpio.c
+++ b/drivers/gpio/intel_ich6_gpio.c
@@ -40,6 +40,7 @@
 #include <asm/io.h>
 #include <asm/pci.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/iproc_gpio.c b/drivers/gpio/iproc_gpio.c
index 9672342bca3..06b5809c245 100644
--- a/drivers/gpio/iproc_gpio.c
+++ b/drivers/gpio/iproc_gpio.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/pinctrl.h>
diff --git a/drivers/gpio/kona_gpio.c b/drivers/gpio/kona_gpio.c
index 9b8e6240f5a..a9acb52f032 100644
--- a/drivers/gpio/kona_gpio.c
+++ b/drivers/gpio/kona_gpio.c
@@ -8,6 +8,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/sysmap.h>
+#include <asm/types.h>
 
 #define GPIO_BASE				(void *)GPIO2_BASE_ADDR
 
diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c
index 39a73ccfb74..e341e86201a 100644
--- a/drivers/gpio/kw_gpio.c
+++ b/drivers/gpio/kw_gpio.c
@@ -7,6 +7,7 @@
 
 /*
  * Based on (mostly copied from) plat-orion based Linux 2.6 kernel driver.
+#include <asm/types.h>
  * Removed orion_gpiochip struct and kernel level irq handling.
  *
  * Dieter Kiermaier dk-arm-linux at gmx.de
diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c
index 34705769cbf..9b57c699a58 100644
--- a/drivers/gpio/mpc83xx_spisel_boot.c
+++ b/drivers/gpio/mpc83xx_spisel_boot.c
@@ -6,12 +6,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <mapmem.h>
 #include <vsprintf.h>
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct mpc83xx_spisel_boot {
 	u32 __iomem *spi_cs;
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c
index 6959f1c5d62..d4c8e8857be 100644
--- a/drivers/gpio/mpc8xxx_gpio.c
+++ b/drivers/gpio/mpc8xxx_gpio.c
@@ -9,12 +9,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <mapmem.h>
 #include <vsprintf.h>
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct ccsr_gpio {
 	u32	gpdir;
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index 9b7bb4b0602..10b4e6046ae 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/gpio.h>
@@ -19,6 +20,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define MSCC_SGPIOS_PER_BANK	32
 #define MSCC_SGPIO_BANK_DEPTH	4
diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c
index d0877485085..f7a9ee9c22e 100644
--- a/drivers/gpio/msm_gpio.c
+++ b/drivers/gpio/msm_gpio.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c
index e569c67a615..a6c58d7906f 100644
--- a/drivers/gpio/mt7621_gpio.c
+++ b/drivers/gpio/mt7621_gpio.c
@@ -8,10 +8,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 65eaa71c201..06910e0a7da 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 <asm/types.h>
 #include <linux/bitops.h>
 
 #define MVEBU_GPIOS_PER_BANK	32
diff --git a/drivers/gpio/mvgpio.c b/drivers/gpio/mvgpio.c
index bf1842ccf7e..7072064092e 100644
--- a/drivers/gpio/mvgpio.c
+++ b/drivers/gpio/mvgpio.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "mvgpio.h"
 #include <asm/gpio.h>
diff --git a/drivers/gpio/mvgpio.h b/drivers/gpio/mvgpio.h
index d68c48e6373..c8857b1ef92 100644
--- a/drivers/gpio/mvgpio.h
+++ b/drivers/gpio/mvgpio.h
@@ -12,6 +12,7 @@
 #define __MVGPIO_H__
 
 #include <common.h>
+#include <asm/types.h>
 
 /*
  * GPIO Register map for Marvell SOCs
diff --git a/drivers/gpio/mvmfp.c b/drivers/gpio/mvmfp.c
index 511042c1990..fc7cbebde8e 100644
--- a/drivers/gpio/mvmfp.c
+++ b/drivers/gpio/mvmfp.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <mvmfp.h>
 #include <asm/arch/mfp.h>
+#include <asm/types.h>
 
 /*
  * mfp_config
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 212516001fc..dc6a042cbd7 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -14,6 +14,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 7a290fba0f7..597f5c8604d 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -19,6 +19,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if	defined(CONFIG_MX23)
 #define	PINCTRL_BANKS		3
diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c
index 5ec73c43599..71e8f06a8a9 100644
--- a/drivers/gpio/nx_gpio.c
+++ b/drivers/gpio/nx_gpio.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index 8d9cee05067..fb0046b39e3 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -25,6 +25,7 @@
 #include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <malloc.h>
 #include <linux/string.h>
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index c3a79b931b8..31f3621d617 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Default to an address that hopefully won't corrupt other i2c devices */
 #ifndef CONFIG_SYS_I2C_PCA953X_ADDR
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index a3ae0c49b98..a3218d15006 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -33,6 +33,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define PCA953X_INPUT           0
 #define PCA953X_OUTPUT          1
diff --git a/drivers/gpio/pca9698.c b/drivers/gpio/pca9698.c
index 11274c78101..3f53c804304 100644
--- a/drivers/gpio/pca9698.c
+++ b/drivers/gpio/pca9698.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <pca9698.h>
 
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index 7eeacd77c2a..5e79ac4bd3a 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <asm-generic/gpio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 62fb3a39d3e..d28375e9e4e 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <spmi/spmi.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c
index fa79bacbd07..f3f77e24be8 100644
--- a/drivers/gpio/rk_gpio.c
+++ b/drivers/gpio/rk_gpio.c
@@ -19,6 +19,7 @@
 #include <dm/pinctrl.h>
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum {
 	ROCKCHIP_GPIOS_PER_BANK		= 32,
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 0d87c6be7f2..ff9131d4eca 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index acbc6495c83..e0b620109a4 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -20,6 +20,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/gpio/sandbox-gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 
 struct gpio_state {
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 693aa873ba2..e9d320af3db 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <asm/bitops.h>
diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c
index 51c3ce610a1..cc54c0d70d4 100644
--- a/drivers/gpio/sifive-gpio.c
+++ b/drivers/gpio/sifive-gpio.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdbool.h>
 #include <vsprintf.h>
@@ -16,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int sifive_gpio_probe(struct udevice *dev)
 {
diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c
index 2aed08781d7..2f66dfc8fd4 100644
--- a/drivers/gpio/spear_gpio.c
+++ b/drivers/gpio/spear_gpio.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static int gpio_direction(unsigned gpio,
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 5bff27f75b5..16a2bb8054e 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -17,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 #define MODE_BITS(gpio_pin)		((gpio_pin) * 2)
 #define MODE_BITS_MASK			3
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index d7ba86cc151..74002e53c4d 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -22,6 +22,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SUNXI_GPIOS_PER_BANK	SUNXI_GPIO_A_NR
 
diff --git a/drivers/gpio/tca642x.c b/drivers/gpio/tca642x.c
index 8b2057607bc..6b038e4553d 100644
--- a/drivers/gpio/tca642x.c
+++ b/drivers/gpio/tca642x.c
@@ -27,6 +27,7 @@
 #include <tca642x.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* tca642x register address definitions */
 struct tca642x_bank_info tca642x_regs[] = {
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c
index affabbbf9a6..19d4e5b18e9 100644
--- a/drivers/gpio/tegra186_gpio.c
+++ b/drivers/gpio/tegra186_gpio.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <asm/gpio.h>
@@ -16,6 +17,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "tegra186_gpio_priv.h"
 
 struct tegra186_gpio_port_data {
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index c002e6864dd..fdc20e66c4b 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -23,6 +23,7 @@
 #include <dm/device-internal.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static const int CONFIG_SFIO = 0;
 static const int CONFIG_GPIO = 1;
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 99f5d07cca0..11fbc6191a1 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -13,6 +13,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
index 2fb39ca0382..32b1e3e8d9f 100644
--- a/drivers/gpio/xilinx_gpio.c
+++ b/drivers/gpio/xilinx_gpio.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define XILINX_GPIO_MAX_BANK	2
 
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index 91b8cd945e3..8754749c1b9 100644
--- a/drivers/gpio/zynq_gpio.c
+++ b/drivers/gpio/zynq_gpio.c
@@ -17,6 +17,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Maximum banks */
 #define ZYNQ_GPIO_MAX_BANK	4
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 14bfc6ae1b6..b61fd98909c 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -14,6 +14,7 @@
 #include <dm/device_compat.h>
 #include <linux/compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static inline const struct hwspinlock_ops *
 hwspinlock_dev_ops(struct udevice *dev)
diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
index ea54063c19b..50851fcddea 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 <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index f0d830e5636..8cf49b16aeb 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -12,11 +12,13 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "ast_i2c.h"
 
diff --git a/drivers/i2c/ast_i2c.h b/drivers/i2c/ast_i2c.h
index 928785989e7..fc6df80a889 100644
--- a/drivers/i2c/ast_i2c.h
+++ b/drivers/i2c/ast_i2c.h
@@ -7,6 +7,7 @@
 #ifndef __AST_I2C_H_
 #define __AST_I2C_H_
 
+#include <asm/types.h>
 struct ast_i2c_regs {
 	u32 fcr;
 	u32 cactcr1;
diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index c656db55706..515a433492d 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -6,6 +6,7 @@
  */
 
 #include <malloc.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -18,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/clk.h>
 
 #include "at91_i2c.h"
diff --git a/drivers/i2c/at91_i2c.h b/drivers/i2c/at91_i2c.h
index 3915af83723..f4b8c40464b 100644
--- a/drivers/i2c/at91_i2c.h
+++ b/drivers/i2c/at91_i2c.h
@@ -2,6 +2,7 @@
 #define _AT91_I2C_H
 
 #include <linux/bitops.h>
+#include <linux/types.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 e894a1a3eb2..943470ce708 100644
--- a/drivers/i2c/cros_ec_ldo.c
+++ b/drivers/i2c/cros_ec_ldo.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.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 694172106c1..4b1c1cfaf03 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -8,6 +8,7 @@
  * --------------------------------------------------------
  *
  * NOTE: This driver should be converted to driver model before June 2017.
+#include <linux/types.h>
  * Please see doc/driver-model/i2c-howto.rst for instructions.
  */
 
diff --git a/drivers/i2c/davinci_i2c.h b/drivers/i2c/davinci_i2c.h
index 57377ce9416..c645a427499 100644
--- a/drivers/i2c/davinci_i2c.h
+++ b/drivers/i2c/davinci_i2c.h
@@ -8,6 +8,7 @@
 #ifndef _DAVINCI_I2C_H_
 #define _DAVINCI_I2C_H_
 
+#include <asm/types.h>
 #define I2C_WRITE		0
 #define I2C_READ		1
 
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index 5aad1a29977..69b36b0fc4d 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -12,12 +12,14 @@
 #include <malloc.h>
 #include <pci.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0f34cc8b5ab..b07c1fd6511 100644
--- a/drivers/i2c/designware_i2c.h
+++ b/drivers/i2c/designware_i2c.h
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <reset.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 struct i2c_regs {
diff --git a/drivers/i2c/designware_i2c_pci.c b/drivers/i2c/designware_i2c_pci.c
index 5f2084acda8..fd69e3cb862 100644
--- a/drivers/i2c/designware_i2c_pci.c
+++ b/drivers/i2c/designware_i2c_pci.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <spl.h>
@@ -18,6 +19,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "designware_i2c.h"
 
 enum {
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index f34c7112529..4be5c667d44 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "s3c24x0_i2c.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 10cc55ce834..77c5f7274a2 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 a5781bcfec2..0482f6a0102 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -8,8 +8,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/i2c/i2c-cortina.c b/drivers/i2c/i2c-cortina.c
index aa7f3a0264e..bad6a4159bf 100644
--- a/drivers/i2c/i2c-cortina.c
+++ b/drivers/i2c/i2c-cortina.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <mapmem.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "i2c-cortina.h"
 
 static void set_speed(struct i2c_regs *regs, int i2c_spd)
diff --git a/drivers/i2c/i2c-cortina.h b/drivers/i2c/i2c-cortina.h
index 7e406b580ea..3d14a35a7a0 100644
--- a/drivers/i2c/i2c-cortina.h
+++ b/drivers/i2c/i2c-cortina.h
@@ -84,4 +84,5 @@ struct ca_i2c {
 #define I2C_STOPDET_TO		(CONFIG_SYS_HZ / 500)
 #define I2C_BYTE_TO_BB		(10)
 
+#include <asm/types.h>
 #endif							/* __CA_I2C_H_ */
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 7e47bed9f4b..98166401666 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -10,12 +10,14 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define DEFAULT_UDELAY	5
 #define RETRIES		0
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index f5a1890d5c9..12123e6a853 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -21,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define I2C_MAX_OFFSET_LEN	4
 
diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c
index c78378fa183..1288d03c6be 100644
--- a/drivers/i2c/i2c-uniphier-f.c
+++ b/drivers/i2c/i2c-uniphier-f.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c
index c1f1eb0325b..273fcbea8c9 100644
--- a/drivers/i2c/i2c-uniphier.c
+++ b/drivers/i2c/i2c-uniphier.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <dm/device_compat.h>
 #include <linux/delay.h>
diff --git a/drivers/i2c/i2c-versatile.c b/drivers/i2c/i2c-versatile.c
index f78b12a560c..98f6dd0c8f5 100644
--- a/drivers/i2c/i2c-versatile.c
+++ b/drivers/i2c/i2c-versatile.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 #define I2C_CONTROL_REG		0x00
 #define I2C_SET_REG		0x00
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 40096e95aa0..acecc4783c4 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -8,10 +8,12 @@
  * Multibus/multiadapter I2C core functions (wrappers)
  */
 #include <common.h>
+#include <compiler.h>
 #include <i2c.h>
 #include <linker_lists.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 struct i2c_adapter *i2c_get_adapter(int index)
 {
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index 5550da80622..af4e79d907f 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -13,6 +13,7 @@
 #include <gdsys_fpga.h>
 #endif
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/unaligned.h>
 #include <linux/bitops.h>
@@ -20,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_I2C
 struct ihs_i2c_priv {
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index aa5c65728cd..e3465f7bce3 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <log.h>
 #include <stdbool.h>
@@ -19,6 +20,7 @@
 #include <i2c.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define LPI2C_FIFO_SIZE 4
 #define LPI2C_NACK_TOUT_MS 1
diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c
index cbda069131a..5b65dae7175 100644
--- a/drivers/i2c/intel_i2c.c
+++ b/drivers/i2c/intel_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* PCI Configuration Space (D31:F3): SMBus */
 #define SMB_BASE		0x20
diff --git a/drivers/i2c/iproc_i2c.c b/drivers/i2c/iproc_i2c.c
index b5d865d66ba..802f9dbb83d 100644
--- a/drivers/i2c/iproc_i2c.c
+++ b/drivers/i2c/iproc_i2c.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
@@ -11,6 +12,7 @@
 #include <dm.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "errno.h"
 #include <i2c.h>
 #include "iproc_i2c.h"
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index e2632a6e36c..d163b3e730c 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -3,6 +3,7 @@
  * Copyright 2013 Broadcom Corporation.
  *
  * NOTE: This driver should be converted to driver model before June 2017.
+#include <linux/types.h>
  * Please see doc/driver-model/i2c-howto.rst for instructions.
  */
 
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 8aef939981f..6abf1ceea09 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <mapmem.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Provide default speed and slave if target did not
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index 3e4b10aff54..6238167633e 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/io.h>
 #include <clk.h>
@@ -14,6 +15,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 2b9e0ba585a..73a23b61c43 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 52da26ab182..c9b07a68dc4 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -19,6 +19,7 @@
 #include <i2c.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index 1af7b68e205..2d8db8a3caf 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -14,6 +14,7 @@
 #include <dm/root.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct i2c_mux: Information the uclass stores about an I2C mux
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 3140a1abb6c..ceb6516cbc4 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm-generic/gpio.h>
 
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 37d04bf11e9..853372595ce 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -17,6 +17,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
@@ -25,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 775f0240346..03fc42aef7b 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #endif
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index dfa84836f53..1fa1187ba3e 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/arch/clock.h>
@@ -33,6 +34,7 @@
 #include <dm/pinctrl.h>
 #include <fdtdec.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/nx_i2c.c b/drivers/i2c/nx_i2c.c
index 54a7bc85f69..9d14fabeb45 100644
--- a/drivers/i2c/nx_i2c.c
+++ b/drivers/i2c/nx_i2c.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define I2C_WRITE       0
 #define I2C_READ        1
diff --git a/drivers/i2c/octeon_i2c.c b/drivers/i2c/octeon_i2c.c
index 19b7622b418..2a152e37264 100644
--- a/drivers/i2c/octeon_i2c.c
+++ b/drivers/i2c/octeon_i2c.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <pci_ids.h>
@@ -14,6 +15,7 @@
 #include <linux/compat.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define TWSI_SW_TWSI		0x00
 #define TWSI_TWSI_SW		0x08
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index b8cfc69c6cc..9ca8d2ef283 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -39,6 +39,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
@@ -46,6 +47,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 1fe207e7bc8..a3adefddff6 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <asm/io.h>
@@ -21,6 +22,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 6899a68a847..37d86c9d950 100644
--- a/drivers/i2c/rcar_iic.c
+++ b/drivers/i2c/rcar_iic.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <asm/io.h>
@@ -18,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct rcar_iic_priv {
 	void __iomem		*base;
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index e430a790df0..b5ecf2fa776 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
@@ -22,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 /* i2c timerout */
 #define I2C_TIMEOUT_MS		100
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 6cc63b528dd..c7c489f68c9 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <i2c.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "s3c24x0_i2c.h"
 
 #ifndef CONFIG_SYS_I2C_S3C24X0_SLAVE
diff --git a/drivers/i2c/s3c24x0_i2c.h b/drivers/i2c/s3c24x0_i2c.h
index 7a37b8071b6..cf438dfb3bd 100644
--- a/drivers/i2c/s3c24x0_i2c.h
+++ b/drivers/i2c/s3c24x0_i2c.h
@@ -7,6 +7,7 @@
 #define _S3C24X0_I2C_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 struct s3c24x0_i2c {
 	u32	iiccon;
 	u32	iicstat;
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index 26a87006698..e664080d616 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2011, 2013 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
  *
  * NOTE: This driver should be converted to driver model before June 2017.
+#include <linux/types.h>
  * Please see doc/driver-model/i2c-howto.rst for instructions.
  */
 
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index db69c18cb6d..26f00766c08 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -12,6 +12,7 @@
  * Neil Russell.
  *
  * NOTE: This driver should be converted to driver model before June 2017.
+#include <linux/types.h>
  * Please see doc/driver-model/i2c-howto.rst for instructions.
  */
 
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 94c0cf6f342..9de35125ce9 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <regmap.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <time.h>
 #include <linux/bitops.h>
@@ -18,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 c9446ed783f..a87e3b40ad5 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 5b05290224a..007ce2ef302 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <reset.h>
@@ -25,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum i2c_type {
 	TYPE_114,
diff --git a/drivers/i2c/xilinx_xiic.c b/drivers/i2c/xilinx_xiic.c
index aa86c630885..8771ffc4bad 100644
--- a/drivers/i2c/xilinx_xiic.c
+++ b/drivers/i2c/xilinx_xiic.c
@@ -11,12 +11,14 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct xilinx_xiic_priv {
 	void __iomem		*base;
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 4b54df8a871..afb94f84391 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio_dev.h>
 #include <input.h>
 #ifdef CONFIG_DM_KEYBOARD
@@ -21,6 +22,7 @@
 #include <linux/input.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 enum {
 	/* These correspond to the lights on the keyboard */
diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c
index 4742d575984..732adad2676 100644
--- a/drivers/input/key_matrix.c
+++ b/drivers/input/key_matrix.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <linux/input.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * Determine if the current keypress configuration can cause key ghosting
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index af289c8badb..9bb1cd5e55b 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch-tegra/timer.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/input.h>
diff --git a/drivers/input/twl4030.c b/drivers/input/twl4030.c
index 3a1c46b3046..045de57abe9 100644
--- a/drivers/input/twl4030.c
+++ b/drivers/input/twl4030.c
@@ -6,6 +6,7 @@
  */
 
 #include <twl4030.h>
+#include <asm/types.h>
 
 int twl4030_input_power_button(void)
 {
diff --git a/drivers/input/twl6030.c b/drivers/input/twl6030.c
index 76bd3488fc6..2515ebffab6 100644
--- a/drivers/input/twl6030.c
+++ b/drivers/input/twl6030.c
@@ -6,6 +6,7 @@
  */
 
 #include <twl6030.h>
+#include <asm/types.h>
 
 int twl6030_input_power_button(void)
 {
diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c
index 84f9a4ceca6..4888d0d3412 100644
--- a/drivers/led/led_bcm6328.c
+++ b/drivers/led/led_bcm6328.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
@@ -12,6 +13,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define LEDS_MAX			24
 
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
index f8fdfcc23de..d52badc0951 100644
--- a/drivers/led/led_bcm6358.c
+++ b/drivers/led/led_bcm6358.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
@@ -13,6 +14,7 @@
 #include <dm/lists.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define LEDS_MAX		32
 #define LEDS_WAIT		100
diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index b44232773b6..ec5bd532e00 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -8,11 +8,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
 #include <log.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index c2c77b64244..1259fa4fb5b 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <stdio.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index 233fa4f715f..e081e808ab4 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <time.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev)
 {
diff --git a/drivers/mailbox/sandbox-mbox-test.c b/drivers/mailbox/sandbox-mbox-test.c
index faca8fcc441..0fd650c7812 100644
--- a/drivers/mailbox/sandbox-mbox-test.c
+++ b/drivers/mailbox/sandbox-mbox-test.c
@@ -8,6 +8,7 @@
 #include <mailbox.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 struct sandbox_mbox_test {
 	struct mbox_chan chan;
diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c
index 27d2b7b9976..0336d0dc4bd 100644
--- a/drivers/mailbox/sandbox-mbox.c
+++ b/drivers/mailbox/sandbox-mbox.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/mbox.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define SANDBOX_MBOX_CHANNELS 2
 
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index 0c72f5e7c3d..c5ec800abf7 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -5,11 +5,13 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <mailbox-uclass.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 4b71e3ca7ef..7f287370a85 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -12,6 +12,7 @@
 #include <dt-bindings/mailbox/tegra186-hsp.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 ef8c93fa460..864a64c3cc2 100644
--- a/drivers/mailbox/zynqmp-ipi.c
+++ b/drivers/mailbox/zynqmp-ipi.c
@@ -6,12 +6,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <mailbox-uclass.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <mach/sys_proto.h>
 #include <linux/ioport.h>
 #include <linux/io.h>
diff --git a/drivers/misc/ali512x.c b/drivers/misc/ali512x.c
index e714e28bdc3..ee9a156c1a2 100644
--- a/drivers/misc/ali512x.c
+++ b/drivers/misc/ali512x.c
@@ -14,6 +14,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 
 #include <common.h>
 #include <asm/io.h>
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index 600315be5ea..2769b3953aa 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <linux/time.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 struct altera_sysid_regs {
 	u32	id;		/* The system build id */
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 2df8d1070c0..c2aa6d15330 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #define ATSHA204A_TWLO			60
diff --git a/drivers/misc/cbmem_console.c b/drivers/misc/cbmem_console.c
index dfa99175d3d..bdc62cba787 100644
--- a/drivers/misc/cbmem_console.c
+++ b/drivers/misc/cbmem_console.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <console.h>
 #ifndef CONFIG_SYS_COREBOOT
 #error This driver requires coreboot
 #endif
+#include <asm/types.h>
 #include <linux/string.h>
 
 #include <asm/arch/sysinfo.h>
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index 7979989e1a6..21ea2242c65 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -25,6 +25,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <linux/delay.h>
@@ -36,6 +37,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef DEBUG_TRACE
 #define debug_trace(fmt, b...)	debug(fmt, #b)
diff --git a/drivers/misc/cros_ec_i2c.c b/drivers/misc/cros_ec_i2c.c
index 2118afee76a..2a37b8e4bb6 100644
--- a/drivers/misc/cros_ec_i2c.c
+++ b/drivers/misc/cros_ec_i2c.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <i2c.h>
 #include <cros_ec.h>
@@ -21,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 6c9c9593a7c..722fc59040d 100644
--- a/drivers/misc/cros_ec_lpc.c
+++ b/drivers/misc/cros_ec_lpc.c
@@ -21,6 +21,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifdef DEBUG_TRACE
 #define debug_trace(fmt, b...)	debug(fmt, ##b)
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index b3282243243..1fba1abfb92 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -13,11 +13,13 @@
 #include <hash.h>
 #include <log.h>
 #include <os.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/sha256.h>
 #include <spi.h>
 #include <asm/malloc.h>
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index 3c3db889d61..532c48ef8b8 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 8d3a690aa1b..ad024bbd7be 100644
--- a/drivers/misc/ds4510.c
+++ b/drivers/misc/ds4510.c
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ds4510.h"
 
 enum {
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index a4d048afd7f..d03279a4c4d 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -17,6 +17,7 @@
 #include <mapmem.h>
 #include <malloc.h>
 #include <spl.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/misc/fsl_devdis.c b/drivers/misc/fsl_devdis.c
index abd20b4d61f..9c7f4ab314c 100644
--- a/drivers/misc/fsl_devdis.c
+++ b/drivers/misc/fsl_devdis.c
@@ -4,12 +4,14 @@
  * Author: Zhuoyu Zhang <Zhuoyu.Zhang at freescale.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/arch-ls102xa/immap_ls102xa.h>
 #include <asm/arch-ls102xa/config.h>
 #include <linux/compiler.h>
 #include <hwconfig.h>
 #include <fsl_devdis.h>
+#include <linux/types.h>
 
 void device_disable(const struct devdis_table *tbl, uint32_t num)
 {
diff --git a/drivers/misc/fsl_ifc.c b/drivers/misc/fsl_ifc.c
index 1716cf21299..7e633fd7748 100644
--- a/drivers/misc/fsl_ifc.c
+++ b/drivers/misc/fsl_ifc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fsl_ifc.h>
 #include <part.h>
 #include <stdio.h>
diff --git a/drivers/misc/fsl_iim.c b/drivers/misc/fsl_iim.c
index 07c7a492081..6b781d73509 100644
--- a/drivers/misc/fsl_iim.c
+++ b/drivers/misc/fsl_iim.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <fuse.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
index ed1e2cf420d..c04c3478528 100644
--- a/drivers/misc/fsl_portals.c
+++ b/drivers/misc/fsl_portals.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.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 62691068bb4..ae7e8e671a1 100644
--- a/drivers/misc/fsl_sec_mon.c
+++ b/drivers/misc/fsl_sec_mon.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_sec_mon.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 
diff --git a/drivers/misc/gdsys_ioep.c b/drivers/misc/gdsys_ioep.c
index ebcd4d91e89..f0f4311436e 100644
--- a/drivers/misc/gdsys_ioep.c
+++ b/drivers/misc/gdsys_ioep.c
@@ -19,6 +19,7 @@
 #include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "gdsys_ioep.h"
 
diff --git a/drivers/misc/gdsys_ioep.h b/drivers/misc/gdsys_ioep.h
index f195388edaf..2f90ca75201 100644
--- a/drivers/misc/gdsys_ioep.h
+++ b/drivers/misc/gdsys_ioep.h
@@ -8,6 +8,8 @@
 #define __GDSYS_IOEP_H_
 
 /**
+#include <compiler.h>
+#include <asm/types.h>
  * struct io_generic_packet - header structure for GDSYS IOEP packets
  * @target_address:     Target protocol address of the packet.
  * @source_address:     Source protocol address of the packet.
diff --git a/drivers/misc/gdsys_rxaui_ctrl.c b/drivers/misc/gdsys_rxaui_ctrl.c
index 7cc350d3cc9..f30da6a7e6a 100644
--- a/drivers/misc/gdsys_rxaui_ctrl.c
+++ b/drivers/misc/gdsys_rxaui_ctrl.c
@@ -12,6 +12,7 @@
 #include <regmap.h>
 #include <misc.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 struct gdsys_rxaui_ctrl_regs {
 	u16 gen_cnt;
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index 0e1ba165f91..8af5842ab96 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -13,6 +13,7 @@
 #include <dm/device-internal.h>
 #include <i2c.h>
 #include <i2c_eeprom.h>
+#include <linux/types.h>
 
 struct i2c_eeprom_drv_data {
 	u32 size; /* size in bytes */
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index e7f9ccdf848..e2a90268304 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef DEBUG
 #define debug_buffer print_buffer
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index fd9c0f937ff..29e875d7ef0 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -20,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ihs_fpga.h"
 
diff --git a/drivers/misc/ihs_fpga.h b/drivers/misc/ihs_fpga.h
index efb5dabb9c9..9541bbec12e 100644
--- a/drivers/misc/ihs_fpga.h
+++ b/drivers/misc/ihs_fpga.h
@@ -5,6 +5,7 @@
  */
 
 /**
+#include <asm/types.h>
  * struct ihs_fpga_regs - IHS FPGA register map structure
  * @reflection_low:	  Lower reflection register
  * @versions:		  PCB versions register
diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c
index c3a7d3a40b3..b786c2f669f 100644
--- a/drivers/misc/imx8/fuse.c
+++ b/drivers/misc/imx8/fuse.c
@@ -11,6 +11,7 @@
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/arm-smccc.h>
 #include <linux/errno.h>
 
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index 74cab629482..f87adb65cc9 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <dm/root.h>
 #include <dm/device-internal.h>
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index bc0d8f7ae5c..6164085b3c5 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <asm/arch/sci/sci.h>
 #include <misc.h>
+#include <asm/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c
index 3795f5eaa1b..ed9f04c7847 100644
--- a/drivers/misc/irq-uclass.c
+++ b/drivers/misc/irq-uclass.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int irq_route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
 {
diff --git a/drivers/misc/irq_sandbox.c b/drivers/misc/irq_sandbox.c
index 625aa140651..a1ec1197f0b 100644
--- a/drivers/misc/irq_sandbox.c
+++ b/drivers/misc/irq_sandbox.c
@@ -12,6 +12,7 @@
 #include <acpi/acpi_device.h>
 #include <asm/test.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /**
  * struct sandbox_irq_priv - private data for this driver
diff --git a/drivers/misc/jz4780_efuse.c b/drivers/misc/jz4780_efuse.c
index 1fba3271db6..d1151495d96 100644
--- a/drivers/misc/jz4780_efuse.c
+++ b/drivers/misc/jz4780_efuse.c
@@ -7,10 +7,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
 #include <errno.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #include <mach/jz4780.h>
 #include <wait_bit.h>
 
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index 621ce8b28d9..b951026fc23 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -18,6 +18,7 @@
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 82aa2545c08..1974c9f3a78 100644
--- a/drivers/misc/k3_esm.c
+++ b/drivers/misc/k3_esm.c
@@ -8,9 +8,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c
index 0886fbdd865..fae073303d5 100644
--- a/drivers/misc/microchip_flexcom.c
+++ b/drivers/misc/microchip_flexcom.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <misc.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 
diff --git a/drivers/misc/misc_sandbox.c b/drivers/misc/misc_sandbox.c
index 0149e8d9a79..2703ac4f117 100644
--- a/drivers/misc/misc_sandbox.c
+++ b/drivers/misc/misc_sandbox.c
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct misc_sandbox_priv {
 	u8 mem[128];
diff --git a/drivers/misc/mpc83xx_serdes.c b/drivers/misc/mpc83xx_serdes.c
index 0f182de1568..f74004e75b7 100644
--- a/drivers/misc/mpc83xx_serdes.c
+++ b/drivers/misc/mpc83xx_serdes.c
@@ -15,6 +15,7 @@
 #include <mapmem.h>
 #include <misc.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/drivers/misc/mpc83xx_serdes.h b/drivers/misc/mpc83xx_serdes.h
index 2a13c5892bf..1a2e094d217 100644
--- a/drivers/misc/mpc83xx_serdes.h
+++ b/drivers/misc/mpc83xx_serdes.h
@@ -5,6 +5,7 @@
  */
 
 /**
+#include <asm/types.h>
  * enum srdscr0_mask - Bit masks for SRDSCR0 (SerDes Control Register 0)
  * @SRDSCR0_DPPA:       Bitmask for the DPPA (diff pk-pk swing for lane A)
  *			field of the SRCSCR0
diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c
index cce6cb72c5e..a3fa6066599 100644
--- a/drivers/misc/mxc_ocotp.c
+++ b/drivers/misc/mxc_ocotp.c
@@ -15,6 +15,7 @@
 #include <fuse.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c
index ede9d9e7423..982cdb66cc1 100644
--- a/drivers/misc/mxs_ocotp.c
+++ b/drivers/misc/mxs_ocotp.c
@@ -21,6 +21,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 #define MXS_OCOTP_TIMEOUT	100000
 
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index eea0e0f528f..4d3a3966088 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -13,10 +13,12 @@
 #include <mapmem.h>
 #include <p2sb.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define PCR_COMMON_IOSF_1_0	1
 
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index ae68cd9c71a..5a74d6acbe0 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -18,6 +18,7 @@
 #include <p2sb.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /**
  * struct p2sb_emul_platdata - platform data for this device
diff --git a/drivers/misc/p2sb_sandbox.c b/drivers/misc/p2sb_sandbox.c
index ce50a9732ee..546fa748256 100644
--- a/drivers/misc/p2sb_sandbox.c
+++ b/drivers/misc/p2sb_sandbox.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <p2sb.h>
+#include <linux/types.h>
 
 struct sandbox_p2sb_priv {
 	ulong base;
diff --git a/drivers/misc/pca9551_led.c b/drivers/misc/pca9551_led.c
index 312192fd62d..f3807397fa4 100644
--- a/drivers/misc/pca9551_led.c
+++ b/drivers/misc/pca9551_led.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <status_led.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #ifndef CONFIG_PCA9551_I2C_ADDR
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index cd845a71bf6..0669a8d7348 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <qfw.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #ifdef CONFIG_GENERATE_ACPI_TABLE
@@ -18,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static bool fwcfg_present;
 static bool fwcfg_dma_present;
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
index ad825e940f1..41239004174 100644
--- a/drivers/misc/rockchip-efuse.c
+++ b/drivers/misc/rockchip-efuse.c
@@ -7,11 +7,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <command.h>
 #include <display_options.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <misc.h>
diff --git a/drivers/misc/rockchip-otp.c b/drivers/misc/rockchip-otp.c
index 6f438c41df5..585a90f61dc 100644
--- a/drivers/misc/rockchip-otp.c
+++ b/drivers/misc/rockchip-otp.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
@@ -13,6 +14,7 @@
 #include <linux/delay.h>
 #include <misc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* OTP Register Offsets */
 #define OTPC_SBPI_CTRL			0x0020
diff --git a/drivers/misc/sandbox_adder.c b/drivers/misc/sandbox_adder.c
index df262e62555..4f53d6b0230 100644
--- a/drivers/misc/sandbox_adder.c
+++ b/drivers/misc/sandbox_adder.c
@@ -13,6 +13,7 @@
 #include <misc.h>
 #include <p2sb.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 struct sandbox_adder_priv {
 	ulong base;
diff --git a/drivers/misc/sifive-otp.c b/drivers/misc/sifive-otp.c
index 97cb40b542c..0a94658a7fd 100644
--- a/drivers/misc/sifive-otp.c
+++ b/drivers/misc/sifive-otp.c
@@ -18,7 +18,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/read.h>
 #include <linux/bitops.h>
diff --git a/drivers/misc/smsc_lpc47m.c b/drivers/misc/smsc_lpc47m.c
index bda064f1365..e6ee39d5c93 100644
--- a/drivers/misc/smsc_lpc47m.c
+++ b/drivers/misc/smsc_lpc47m.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/pnp_def.h>
+#include <linux/types.h>
 
 static void pnp_enter_conf_state(u16 dev)
 {
diff --git a/drivers/misc/smsc_sio1007.c b/drivers/misc/smsc_sio1007.c
index 9fe6a18f59e..01a97dd5cce 100644
--- a/drivers/misc/smsc_sio1007.c
+++ b/drivers/misc/smsc_sio1007.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <errno.h>
 #include <smsc_sio1007.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static inline u8 sio1007_read(int port, int reg)
diff --git a/drivers/misc/spltest_sandbox.c b/drivers/misc/spltest_sandbox.c
index 1bb4120a06d..511dd9970de 100644
--- a/drivers/misc/spltest_sandbox.c
+++ b/drivers/misc/spltest_sandbox.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c
index a6e9c03a02e..6720886e14e 100644
--- a/drivers/misc/status_led.c
+++ b/drivers/misc/status_led.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <status_led.h>
+#include <linux/types.h>
 
 /*
  * The purpose of this code is to signal the operational status of a
diff --git a/drivers/misc/stm32_rcc.c b/drivers/misc/stm32_rcc.c
index 9a03679d21a..d5e6f801623 100644
--- a/drivers/misc/stm32_rcc.c
+++ b/drivers/misc/stm32_rcc.c
@@ -13,6 +13,7 @@
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct stm32_rcc_clk stm32_rcc_clk_f42x = {
 	.drv_name = "stm32fx_rcc_clock",
diff --git a/drivers/misc/stm32mp_fuse.c b/drivers/misc/stm32mp_fuse.c
index 2d8c43b123f..1e2d8df75dc 100644
--- a/drivers/misc/stm32mp_fuse.c
+++ b/drivers/misc/stm32mp_fuse.c
@@ -9,6 +9,7 @@
 #include <misc.h>
 #include <errno.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
 #include <linux/errno.h>
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index fa3ed8671c2..566e076eb50 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -15,6 +15,7 @@
 #include <linux/ctype.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /**
  * struct swap_case_platdata - platform data for this device
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index 96913285927..dad726a1b47 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BPMP_IVC_FRAME_COUNT 1
 #define BPMP_IVC_FRAME_SIZE 128
diff --git a/drivers/misc/vexpress_config.c b/drivers/misc/vexpress_config.c
index 3a74ffcadda..f72780f96b8 100644
--- a/drivers/misc/vexpress_config.c
+++ b/drivers/misc/vexpress_config.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/read.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/misc/winbond_w83627.c b/drivers/misc/winbond_w83627.c
index 3838b3f74f4..c3c331bc1cf 100644
--- a/drivers/misc/winbond_w83627.c
+++ b/drivers/misc/winbond_w83627.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/pnp_def.h>
+#include <linux/types.h>
 
 #define WINBOND_ENTRY_KEY	0x87
 #define WINBOND_EXIT_KEY	0xaa
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index a8d1e9d7bbb..430a4d6d6cc 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -12,11 +12,13 @@
 #include <power-domain.h>
 #include <regmap.h>
 #include <sdhci.h>
+#include <stdbool.h>
 #include <time.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* CTL_CFG Registers */
 #define CTL_CFG_2		0x14
diff --git a/drivers/mmc/arm_pl180_mmci.h b/drivers/mmc/arm_pl180_mmci.h
index 61ee96a112d..c068dc086cc 100644
--- a/drivers/mmc/arm_pl180_mmci.h
+++ b/drivers/mmc/arm_pl180_mmci.h
@@ -12,6 +12,7 @@
 #ifndef __ARM_PL180_MMCI_H__
 #define __ARM_PL180_MMCI_H__
 
+#include <asm/types.h>
 /* need definition of struct mmc_config */
 #include <mmc.h>
 
diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c
index 543c65a8e35..c48cfae42e0 100644
--- a/drivers/mmc/aspeed_sdhci.c
+++ b/drivers/mmc/aspeed_sdhci.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <sdhci.h>
+#include <asm/types.h>
 #include <linux/err.h>
 
 struct aspeed_sdhci_plat {
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index cb838a398a6..0022aebf829 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/arch/clk.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #define ATMEL_SDHC_MIN_FREQ	400000
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index ac1a421cd3e..05756170d3b 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -46,6 +46,7 @@
 #include <asm/arch/msg.h>
 #include <asm/arch/mbox.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <mach/sdhci.h>
 #include <mach/timer.h>
 
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 315a829f205..12029be39a0 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -31,8 +31,10 @@
  */
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/arch/msg.h>
@@ -48,6 +50,7 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <mach/gpio.h>
 #include <power/regulator.h>
 
diff --git a/drivers/mmc/ca_dw_mmc.c b/drivers/mmc/ca_dw_mmc.c
index fcb2700a7a8..745829790dc 100644
--- a/drivers/mmc/ca_dw_mmc.c
+++ b/drivers/mmc/ca_dw_mmc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dwmmc.h>
 #include <fdtdec.h>
 #include <asm/global_data.h>
@@ -15,6 +16,7 @@
 #include <dm.h>
 #include <mapmem.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SD_CLK_SEL_MASK (0x3)
 #define SD_DLL_DEFAULT  (0x143000)
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index f8dc47bc239..1f0177b26ba 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define WATCHDOG_COUNT		(100000)
 
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index ade5dbe4721..7d461bc315e 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 #define PAGE_SIZE 4096
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 9fcb416b042..3a764d50e1d 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -20,6 +20,7 @@
 #include <asm/arch/power.h>
 #include <asm/gpio.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define	DWMMC_MAX_CH_NUM		4
 #define	DWMMC_MAX_FREQ			52000000
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 0fb2d505c15..da7c0cce8a4 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -9,6 +9,7 @@
  * Kyle Harris, Nexus Technologies, Inc. kharris at nexus-tech.net
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <command.h>
@@ -20,6 +21,7 @@
 #include <malloc.h>
 #include <fsl_esdhc.h>
 #include <fdt_support.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -33,6 +35,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 995fa6fefd8..67f333ebf0a 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -10,6 +10,7 @@
  * Kyle Harris, Nexus Technologies, Inc. kharris at nexus-tech.net
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <command.h>
@@ -33,6 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <malloc.h>
 #include <fsl_esdhc_imx.h>
diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c
index 3359d67fafa..0f17058e9f1 100644
--- a/drivers/mmc/fsl_esdhc_spl.c
+++ b/drivers/mmc/fsl_esdhc_spl.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * The environment variables are written to just after the u-boot image
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index cc0348d4663..da81fb6343d 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -11,10 +11,12 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/global_data.h>
@@ -24,6 +26,7 @@
 #include <asm/byteorder.h>
 #include <faraday/ftsdc010.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ftsdc010_mci.h"
 #include <dm.h>
 #include <dt-structs.h>
diff --git a/drivers/mmc/ftsdc010_mci.h b/drivers/mmc/ftsdc010_mci.h
index 2c487b4176d..885ec8f8e1b 100644
--- a/drivers/mmc/ftsdc010_mci.h
+++ b/drivers/mmc/ftsdc010_mci.h
@@ -5,8 +5,10 @@
  * Copyright (C) 2011 Andes Technology Corporation
  * Macpaul Lin, Andes Technology Corporation <macpaul at andestech.com>
  */
+#include <compiler.h>
 #include <mmc.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 #ifndef __FTSDC010_MCI_H
 #define __FTSDC010_MCI_H
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 4b1869ae65c..799d17e5871 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -24,6 +24,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "atmel_mci.h"
 
 #ifndef CONFIG_SYS_MMC_CLK_OD
diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index b3a8c5d50d8..f1b94b8958f 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index 216538d435a..60b6cd0bfdc 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -11,6 +11,7 @@
 #include <sdhci.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index c8c7127cbe8..495f1edd5b5 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -7,10 +7,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <asm/unaligned.h>
 #include <errno.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mmc/kona_sdhci.c b/drivers/mmc/kona_sdhci.c
index dc7a203f1f0..9f79851f80a 100644
--- a/drivers/mmc/kona_sdhci.c
+++ b/drivers/mmc/kona_sdhci.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <sdhci.h>
 #include <stdio.h>
+#include <asm/types.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 2df20418be3..883932f5c89 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <pwrseq.h>
 #include <mmc.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -20,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/string.h>
+#include <linux/types.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 da06aa9e7b6..1463a375947 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <mmc.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
@@ -16,6 +17,7 @@
 #include <linux/compat.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "mmc_private.h"
 
 int dm_mmc_get_b_max(struct udevice *dev, void *dst, lbaint_t blkcnt)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index e38950dd6e0..fb2964fb5b6 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -7,12 +7,14 @@
  * Based vaguely on the Linux code
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -27,6 +29,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 0a74b1fb776..546f7c975a8 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <mmc.h>
+#include <asm/types.h>
 #include "mmc_private.h"
 
 /*
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
index a0900e8cadd..df6b1e8178f 100644
--- a/drivers/mmc/mmc_private.h
+++ b/drivers/mmc/mmc_private.h
@@ -11,6 +11,7 @@
 #define _MMC_PRIVATE_H_
 
 #include <mmc.h>
+#include <linux/types.h>
 
 int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data);
 int mmc_send_status(struct mmc *mmc, unsigned int *status);
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index ac8a127029c..15584710c32 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -18,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 93eb1404def..963627ab1ce 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/math64.h>
+#include <linux/types.h>
 #include "mmc_private.h"
 
 static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt)
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 0ac7529f01a..49446cb5a65 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Non-standard registers needed for SDHCI startup */
 #define SDCC_MCI_POWER   0x0
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index b6632a32d36..178fe1af43d 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -8,6 +8,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <mmc.h>
 #include <errno.h>
@@ -23,6 +24,7 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* MSDC_CFG */
 #define MSDC_CFG_HS400_CK_MODE_EXT	BIT(22)
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index f3e44f53cb4..d8515c6e6f1 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <malloc.h>
 #include <sdhci.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/mbus.h>
 #include <linux/string.h>
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 3a967ac7720..c6df83fb02e 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -22,6 +22,7 @@
 #include <mvebu_mmc.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c
index 01d57d4c778..ef8ef632563 100644
--- a/drivers/mmc/mxcmmc.c
+++ b/drivers/mmc/mxcmmc.c
@@ -25,6 +25,7 @@
 #include <mmc.h>
 #include <stdio.h>
 #include <time.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 615ed6b1700..177a4bbc297 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -37,6 +37,7 @@
 #include <bouncebuf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define	MXSMMC_MAX_TIMEOUT	10000
 #define MXSMMC_SMALL_TRANSFER	512
diff --git a/drivers/mmc/nexell_dw_mmc.c b/drivers/mmc/nexell_dw_mmc.c
index 35704e74d6b..b721264c7a1 100644
--- a/drivers/mmc/nexell_dw_mmc.c
+++ b/drivers/mmc/nexell_dw_mmc.c
@@ -16,6 +16,7 @@
 #include <asm/arch/reset.h>
 #include <asm/arch/clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define DWMCI_CLKSEL			0x09C
 #define DWMCI_SHIFT_0			0x0
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4de6bb1d972..f12af49257b 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -22,6 +22,7 @@
  * MA 02111-1307 USA
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
@@ -34,6 +35,7 @@
 #if defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)
 #include <palmas.h>
 #endif
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -59,6 +61,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <thermal.h>
 
diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c
index 009bf00a7f8..9e5ddc44aa7 100644
--- a/drivers/mmc/pic32_sdhci.c
+++ b/drivers/mmc/pic32_sdhci.c
@@ -11,6 +11,7 @@
 #include <sdhci.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <mach/pic32.h>
 
diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c
index 5a4652e2461..cc1d8c640c1 100644
--- a/drivers/mmc/pxa_mmc_gen.c
+++ b/drivers/mmc/pxa_mmc_gen.c
@@ -21,6 +21,7 @@
 #include <mmc.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* PXAMMC Generic default config for various CPUs */
 #if defined(CONFIG_CPU_PXA25X)
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 1c4ce0ff02a..245c5310eab 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
@@ -21,6 +22,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <asm/unaligned.h>
 #include "tmio-common.h"
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 6d31f9f3d30..7f1c63f8476 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <pwrseq.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <asm/gpio.h>
 #include <asm/arch-rockchip/clock.h>
@@ -19,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct rockchip_mmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index cf32ca80821..cabada7acc6 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <asm/gpio.h>
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 58c79a8821b..79d7da1dc03 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <mmc.h>
 #include <asm/test.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index fd5b77351a2..239badca582 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -5,8 +5,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 023eede0121..342106afb49 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -16,6 +16,7 @@
 #include <mmc.h>
 #include <sdhci.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/cache.h>
@@ -27,6 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static void sdhci_reset(struct sdhci_host *host, u8 mask)
 {
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index ede46d1b6ac..15b2b0533f1 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/sh_mmcif.h b/drivers/mmc/sh_mmcif.h
index 66341e51d26..4a9896cd836 100644
--- a/drivers/mmc/sh_mmcif.h
+++ b/drivers/mmc/sh_mmcif.h
@@ -8,6 +8,7 @@
 #ifndef _SH_MMCIF_H_
 #define _SH_MMCIF_H_
 
+#include <asm/types.h>
 struct sh_mmcif_regs {
 	unsigned long ce_cmd_set;
 	unsigned long reserved;
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 97fb1ee48ec..c62315565d6 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <mmc.h>
@@ -17,6 +18,7 @@
 #include <part.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/snps_dw_mmc.c b/drivers/mmc/snps_dw_mmc.c
index 5572afa1e48..08571ccd263 100644
--- a/drivers/mmc/snps_dw_mmc.c
+++ b/drivers/mmc/snps_dw_mmc.c
@@ -13,6 +13,7 @@
 #include <dwmmc.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 9877919f4f1..72f2e193158 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index 62f9c7a6f5d..7819b2820e7 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -11,9 +11,11 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/cache.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index b562595e2f3..6e3b5ff9324 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -27,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_MMC
 struct sunxi_mmc_variant {
diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c
index 622cc3ef1be..fe1bb77177c 100644
--- a/drivers/mmc/tangier_sdhci.c
+++ b/drivers/mmc/tangier_sdhci.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2017 Intel Corporation
  */
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dm/device.h>
 #include <linux/errno.h>
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 4cf18386434..039ea551e7b 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -24,6 +24,7 @@
 #include <asm/arch/clock.h>
 #endif
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct tegra_mmc_plat {
 	struct mmc_config cfg;
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 5e8076fcd97..be54dcf635a 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <mmc.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
@@ -20,6 +21,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <asm/unaligned.h>
 
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index 4160cbe0f5c..f5e0b98d438 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -7,8 +7,10 @@
 #ifndef __TMIO_COMMON_H__
 #define __TMIO_COMMON_H__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/bitops.h>
+#include <linux/types.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/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 088e1d9a900..6e6c267fcd2 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -16,6 +16,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <asm/unaligned.h>
 
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 46c8db49547..a0eb9f370b0 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -28,6 +28,7 @@
 #include <sdhci.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 923a10f11ec..d1beb3a2a57 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include "mmc_private.h"
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 1a43ad9977a..5c33dbf1f4f 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -18,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 9fed43f05a0..c84d59ce8a1 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -17,6 +17,7 @@
 /* #define DEBUG	*/
 
 #include <common.h>
+#include <compiler.h>
 #include <console.h>
 #include <dm.h>
 #include <env.h>
@@ -40,6 +41,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <mtd/cfi_flash.h>
 #include <watchdog.h>
 
diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c
index 02b4277bd23..dedb740a650 100644
--- a/drivers/mtd/cfi_mtd.c
+++ b/drivers/mtd/cfi_mtd.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/hbmc-am654.c b/drivers/mtd/hbmc-am654.c
index 848c5ede413..366d4b80e85 100644
--- a/drivers/mtd/hbmc-am654.c
+++ b/drivers/mtd/hbmc-am654.c
@@ -4,11 +4,13 @@
 // Author: Vignesh Raghavendra <vigneshr at ti.com>
 
 #include <common.h>
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index 9456c9abbc3..0edbe6064a1 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define P_ID_AMD_STD CFI_CMDSET_AMD_LEGACY
 
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index cdf4600cd31..70242ce382c 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -7,6 +7,7 @@
 #include <env.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <dm/device.h>
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index b995fb8abab..de624825478 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -28,6 +28,7 @@
 #include <linux/gfp.h>
 #include <linux/slab.h>
 #else
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
@@ -35,6 +36,7 @@
 #include <ubi_uboot.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #endif
 
 #include <linux/log2.h>
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index ea31330bf11..d238788c17b 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/bug.h>
diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c
index 5d1a3573241..58b8d671c91 100644
--- a/drivers/mtd/mw_eeprom.c
+++ b/drivers/mtd/mw_eeprom.c
@@ -4,6 +4,7 @@
 #include <eeprom.h>
 #include <stdio.h>
 #include <asm/ic/ssi.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /*
diff --git a/drivers/mtd/nand/raw/am335x_spl_bch.c b/drivers/mtd/nand/raw/am335x_spl_bch.c
index b6fc5f29c7a..7b40689cc64 100644
--- a/drivers/mtd/nand/raw/am335x_spl_bch.c
+++ b/drivers/mtd/nand/raw/am335x_spl_bch.c
@@ -10,10 +10,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/types.h>
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 static struct mtd_info *mtd;
diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
index c604db376c1..e56b0603867 100644
--- a/drivers/mtd/nand/raw/arasan_nfc.c
+++ b/drivers/mtd/nand/raw/arasan_nfc.c
@@ -6,9 +6,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 75c21ff7852..78c3ab2dc06 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
@@ -22,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <malloc.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand_ecc.h b/drivers/mtd/nand/raw/atmel_nand_ecc.h
index 05eeedb3f84..1ece825186c 100644
--- a/drivers/mtd/nand/raw/atmel_nand_ecc.h
+++ b/drivers/mtd/nand/raw/atmel_nand_ecc.h
@@ -7,6 +7,7 @@
 #ifndef ATMEL_NAND_ECC_H
 #define ATMEL_NAND_ECC_H
 
+#include <asm/types.h>
 #define ATMEL_ECC_CR		0x00			/* Control register */
 #define		ATMEL_ECC_RST		(1 << 0)		/* Reset parity */
 
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
index acfe2ba0bd2..f07498fe261 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
@@ -1,9 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
index 4c886e1533f..d17b80e507a 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
@@ -1,9 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
index a649b1a8963..d93a11c0c98 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
@@ -1,9 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
index 25bfe253f29..de19a16e61c 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
@@ -1,9 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
index 926c59eb148..2d0bbea727c 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
@@ -1,9 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index b90f26978ff..65159d9e021 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -13,6 +13,8 @@
  */
 
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -32,6 +34,7 @@
 #include <asm/processor.h>
 #include <dm.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "brcmnand.h"
 #include "brcmnand_compat.h"
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.h b/drivers/mtd/nand/raw/brcmnand/brcmnand.h
index 2a48dfea90c..90b24f95ca0 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.h
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.h
@@ -3,6 +3,7 @@
 #ifndef __BRCMNAND_H__
 #define __BRCMNAND_H__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/types.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
index 9223b9260d1..4a000a59a25 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
@@ -5,6 +5,7 @@
 #include <stdarg.h>
 #include <vsprintf.h>
 #include <dm/devres.h>
+#include <linux/types.h>
 #include "brcmnand_compat.h"
 
 static char *devm_kvasprintf(struct udevice *dev, gfp_t gfp, const char *fmt,
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
index 6f9bec7085c..816eae05189 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
@@ -5,6 +5,7 @@
 
 #include <clk.h>
 #include <dm.h>
+#include <linux/types.h>
 
 char *devm_kasprintf(struct udevice *dev, gfp_t gfp, const char *fmt, ...);
 
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index c00fc65b6a0..fea7147054a 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 <compiler.h>
 #include <log.h>
 #include <asm/io.h>
 #include <nand.h>
@@ -37,6 +38,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* Definitions for 4-bit hardware ECC */
 #define NAND_TIMEOUT			10240
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 0e84f37784d..92361e637bc 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -25,6 +25,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "denali.h"
 
diff --git a/drivers/mtd/nand/raw/denali.h b/drivers/mtd/nand/raw/denali.h
index 6cd02b2e26e..afc01880998 100644
--- a/drivers/mtd/nand/raw/denali.h
+++ b/drivers/mtd/nand/raw/denali.h
@@ -7,6 +7,7 @@
 #ifndef __DENALI_H__
 #define __DENALI_H__
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/types.h>
diff --git a/drivers/mtd/nand/raw/denali_spl.c b/drivers/mtd/nand/raw/denali_spl.c
index ed077fd06bc..ad164139ed5 100644
--- a/drivers/mtd/nand/raw/denali_spl.c
+++ b/drivers/mtd/nand/raw/denali_spl.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
@@ -13,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "denali.h"
 
 #define DENALI_MAP01		(1 << 26)	/* read/write pages in PIO */
diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index eb95cb00303..0c0b1dec55d 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
@@ -9,12 +9,14 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <nand.h>
 #include <stdio.h>
 #include <time.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/fsl_elbc_spl.c b/drivers/mtd/nand/raw/fsl_elbc_spl.c
index e8b9f40f3b0..0564d270e06 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_spl.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_spl.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/fsl_lbc.h>
 #include <nand.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_MPC83xx
 #include "../../../arch/powerpc/cpu/mpc83xx/elbc/elbc.h"
diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c
index 291dda8fb48..720f8fcbd35 100644
--- a/drivers/mtd/nand/raw/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c
@@ -8,12 +8,14 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <nand.h>
 #include <stdio.h>
 #include <time.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/fsl_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c
index cf09fce3fbb..180fa82ddb7 100644
--- a/drivers/mtd/nand/raw/fsl_ifc_spl.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c
@@ -16,6 +16,7 @@
 #ifdef CONFIG_CHAIN_OF_TRUST
 #include <fsl_validate.h>
 #endif
+#include <linux/types.h>
 
 static inline int is_blank(uchar *addr, int page_size)
 {
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index 6c86a7e7671..be9d40a07a0 100644
--- a/drivers/mtd/nand/raw/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
@@ -6,6 +6,7 @@
  *                    Anton Vorontsov <avorontsov at ru.mvista.com>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <log.h>
@@ -15,6 +16,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/fsl_upm.h>
 #include <nand.h>
+#include <linux/types.h>
 
 static void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
 {
diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
index 5994c321cac..8fcf00f9107 100644
--- a/drivers/mtd/nand/raw/fsmc_nand.c
+++ b/drivers/mtd/nand/raw/fsmc_nand.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <nand.h>
 #include <stdio.h>
 #include <time.h>
@@ -20,6 +21,7 @@
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/arch/hardware.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static u32 fsmc_version;
 static struct fsmc_regs *const fsmc_regs_p = (struct fsmc_regs *)
diff --git a/drivers/mtd/nand/raw/kb9202_nand.c b/drivers/mtd/nand/raw/kb9202_nand.c
index 0f68f1cd867..4b759dd25e6 100644
--- a/drivers/mtd/nand/raw/kb9202_nand.c
+++ b/drivers/mtd/nand/raw/kb9202_nand.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/AT91RM9200.h>
 #include <asm/arch/hardware.h>
+#include <linux/types.h>
 
 #include <nand.h>
 
diff --git a/drivers/mtd/nand/raw/kirkwood_nand.c b/drivers/mtd/nand/raw/kirkwood_nand.c
index 0757fa840b8..6b0cd581ead 100644
--- a/drivers/mtd/nand/raw/kirkwood_nand.c
+++ b/drivers/mtd/nand/raw/kirkwood_nand.c
@@ -10,6 +10,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <nand.h>
+#include <asm/types.h>
 
 /* NAND Flash Soc registers */
 struct kwnandf_registers {
diff --git a/drivers/mtd/nand/raw/kmeter1_nand.c b/drivers/mtd/nand/raw/kmeter1_nand.c
index cf33f2863e1..c2252464ad6 100644
--- a/drivers/mtd/nand/raw/kmeter1_nand.c
+++ b/drivers/mtd/nand/raw/kmeter1_nand.c
@@ -8,6 +8,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.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 368ce3e54ed..af93baf38ba 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
@@ -13,6 +13,8 @@
  *
  * Consequently, pages with meaningful in-band data are written with
  * blank (all-ones) out-of-band data and a valid ECC, and any later
+#include <compiler.h>
+#include <linux/types.h>
  * out-of-band data write will void the ECC.
  *
  * Therefore, code which reads such late-written out-of-band data
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
index 07a44a565ad..018acbdf8a0 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <nand.h>
 #include <linux/bug.h>
@@ -24,6 +25,7 @@
 #include <asm/arch/dma.h>
 #include <asm/arch/cpu.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct lpc32xx_nand_slc_regs {
 	u32 data;
diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index f012f7329c9..61da84f7e79 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <nand.h>
 #include <linux/delay.h>
@@ -18,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "mxc_nand.h"
 
 #define DRIVER_NAME "mxc_nand"
diff --git a/drivers/mtd/nand/raw/mxc_nand.h b/drivers/mtd/nand/raw/mxc_nand.h
index 1c7f3a2e227..fd008b294b6 100644
--- a/drivers/mtd/nand/raw/mxc_nand.h
+++ b/drivers/mtd/nand/raw/mxc_nand.h
@@ -43,6 +43,7 @@
 #else
 #error "MXC NFC implementation not supported"
 #endif
+#include <asm/types.h>
 #define is_mxc_nfc_3()		is_mxc_nfc_32()
 
 #if defined(MXC_NFC_V1)
diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c
index c3e136899f9..22bd476479a 100644
--- a/drivers/mtd/nand/raw/mxc_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxc_nand_spl.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "mxc_nand.h"
 
 #if defined(MXC_NFC_V1) || defined(MXC_NFC_V2_1)
diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c
index 8ab4dab32c0..d6e1273a74c 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 <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <linux/kernel.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 0fe538e7d6d..e7e5683d90f 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -17,6 +17,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct mtd_info *mtd;
 static struct nand_chip nand_chip;
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
index 486c1b4a8bd..b43f3f5d9ca 100644
--- a/drivers/mtd/nand/raw/nand.c
+++ b/drivers/mtd/nand/raw/nand.c
@@ -6,11 +6,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <nand.h>
 #include <errno.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/mtd/concat.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SYS_NAND_BASE_LIST
 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 115f5a771be..79e872b0ca1 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -34,6 +34,7 @@
 #endif
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <time.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
@@ -55,6 +56,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Define default oob placement schemes for large and small page devices */
 #ifndef CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index 36ca2230269..429a96eb6bf 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -72,6 +72,7 @@
 #include <linux/bitops.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BBT_BLOCK_GOOD		0x00
 #define BBT_BLOCK_WORN		0x01
diff --git a/drivers/mtd/nand/raw/nand_ecc.c b/drivers/mtd/nand/raw/nand_ecc.c
index 2bc329be1a3..d31fd2d0c4b 100644
--- a/drivers/mtd/nand/raw/nand_ecc.c
+++ b/drivers/mtd/nand/raw/nand_ecc.c
@@ -23,6 +23,7 @@
  */
 
 #include <common.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/nand_spl_loaders.c b/drivers/mtd/nand/raw/nand_spl_loaders.c
index 75ded89893a..08797e0d40a 100644
--- a/drivers/mtd/nand/raw/nand_spl_loaders.c
+++ b/drivers/mtd/nand/raw/nand_spl_loaders.c
@@ -1,5 +1,6 @@
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst)
 {
 	unsigned int block, lastblock;
diff --git a/drivers/mtd/nand/raw/nand_spl_simple.c b/drivers/mtd/nand/raw/nand_spl_simple.c
index 09e053541a9..1f1261fd948 100644
--- a/drivers/mtd/nand/raw/nand_spl_simple.c
+++ b/drivers/mtd/nand/raw/nand_spl_simple.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/types.h>
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 static struct mtd_info *mtd;
diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
index f753970d9e7..95169503c2c 100644
--- a/drivers/mtd/nand/raw/nand_util.c
+++ b/drivers/mtd/nand/raw/nand_util.c
@@ -30,6 +30,7 @@
 #include <dm/devres.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index 87368743a9a..87dd2feccd5 100644
--- a/drivers/mtd/nand/raw/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/mtd/omap_elm.h>
 #include <asm/arch/hardware.h>
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 2863b1de1b6..f83cee14212 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 <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
@@ -17,6 +18,7 @@
 #include <nand.h>
 #include <linux/mtd/omap_elm.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BADBLOCK_MARKER_LENGTH	2
 #define SECTOR_BYTES		512
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index 8678866d3dd..7287cc32f43 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <fdtdec.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.h b/drivers/mtd/nand/raw/pxa3xx_nand.h
index d7304d0b34e..5d8c886855f 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.h
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.h
@@ -4,6 +4,7 @@
 #include <stdbool.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/types.h>
 
 struct pxa3xx_nand_timing {
 	unsigned int	tCH;  /* Enable signal hold time */
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 21b5c859467..33135f24408 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -6,10 +6,13 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <nand.h>
 #include <reset.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 025f18ad49d..4d17d138619 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -25,10 +25,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdtdec.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <nand.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
@@ -39,6 +41,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/kernel.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index e24bd384c26..7ad486c5dbd 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -4,6 +4,7 @@
  * Copyright (c) 2015, AW-SOM Technologies <www.aw-som.com>
  */
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
@@ -16,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 ace59249b9e..c8a31f29688 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -26,6 +26,7 @@
 #include <dm.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tegra_nand.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mtd/nand/raw/tegra_nand.h b/drivers/mtd/nand/raw/tegra_nand.h
index 77401606617..e65a36851ca 100644
--- a/drivers/mtd/nand/raw/tegra_nand.h
+++ b/drivers/mtd/nand/raw/tegra_nand.h
@@ -4,6 +4,7 @@
  */
 
 /* register offset */
+#include <asm/types.h>
 #define COMMAND_0		0x00
 #define CMD_GO			(1 << 31)
 #define CMD_CLE			(1 << 30)
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 49cf29a7abe..df86cc6b48d 100644
--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -22,6 +22,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <time.h>
@@ -30,6 +31,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 6af6b7bd844..2b177a4cf83 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -7,10 +7,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 99622a335a3..123cb6dc123 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <spi.h>
 #include <spi-mem.h>
+#include <stdbool.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <dm/device_compat.h>
@@ -34,6 +35,7 @@
 #include <linux/mtd/spinand.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 
 /* SPI NAND index visible in MTD names */
diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c
index 465f18642b0..c291f02b9b5 100644
--- a/drivers/mtd/nand/spi/gigadevice.c
+++ b/drivers/mtd/nand/spi/gigadevice.c
@@ -11,6 +11,7 @@
 #include <linux/device.h>
 #include <linux/kernel.h>
 #endif
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/mtd/spinand.h>
 
diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c
index 83f9daaf579..0929d2b5dc2 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 <asm/types.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/mtd/spinand.h>
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 5fde4a78d23..b2978b59a11 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 <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/mtd/spinand.h>
diff --git a/drivers/mtd/nand/spi/toshiba.c b/drivers/mtd/nand/spi/toshiba.c
index d0b003d2957..6895f364800 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 <asm/types.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/mtd/spinand.h>
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index 4e1c8883b38..ac7fc3d1311 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 <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/mtd/spinand.h>
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index f576aea331c..80fb722e357 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -31,6 +32,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "linux/mtd/flashchip.h"
 #include <linux/mtd/onenand.h>
 
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index a698961597f..f698272d85a 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -23,6 +23,7 @@
 #include <malloc.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 
diff --git a/drivers/mtd/onenand/onenand_spl.c b/drivers/mtd/onenand/onenand_spl.c
index 69c529e658d..71593822059 100644
--- a/drivers/mtd/onenand/onenand_spl.c
+++ b/drivers/mtd/onenand/onenand_spl.c
@@ -14,6 +14,7 @@
 #include <linux/mtd/onenand_regs.h>
 #include <onenand_uboot.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Device geometry:
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index be6c8e1def3..7f6f9a45026 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <linux/compat.h>
@@ -19,6 +20,7 @@
 #include <linux/mtd/samsung_onenand.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index 3daa76f949a..3c36297d046 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
@@ -17,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 0531db38831..57312eae09e 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -25,6 +26,7 @@
 #include <wait_bit.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <mtd/cfi_flash.h>
 
 #define RPC_CMNCR		0x0000	/* R/W */
diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c
index 5a3b5abd5c7..802c1f51b4d 100644
--- a/drivers/mtd/spi/fsl_espi_spl.c
+++ b/drivers/mtd/spi/fsl_espi_spl.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define ESPI_BOOT_IMAGE_SIZE	0x48
 #define ESPI_BOOT_IMAGE_ADDR	0x50
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 424c74d74fd..8d70f7a8235 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <spi_flash.h>
 #include "sf_internal.h"
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 354d7b47f0f..47bb546ff11 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "sf_internal.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index 558cf39ba67..e7e57e59d0b 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/math64.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "sf_internal.h"
 
diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index cf9d79c9557..6f7c7fe9e46 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -13,6 +13,7 @@
 #include <linux/mtd/mtd.h>
 #include <spi_flash.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct mtd_info sf_mtd_info;
 static bool sf_mtd_registered;
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 8cf4acf45d6..f22e08bb978 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "sf_internal.h"
 
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 62b9a78be3f..b8db3d33e0d 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <display_options.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <dm/device_compat.h>
@@ -25,6 +26,7 @@
 #include <linux/printk.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/spi-nor.h>
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index dead5679e89..f2d500c2cc4 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <dm/device_compat.h>
@@ -22,6 +23,7 @@
 #include <linux/printk.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/spi-nor.h>
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index 6488897b438..9ed46e137b5 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/mtd/st_smi.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/drivers/mtd/stm32_flash.c b/drivers/mtd/stm32_flash.c
index 703afc7a07e..f47976a3238 100644
--- a/drivers/mtd/stm32_flash.c
+++ b/drivers/mtd/stm32_flash.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
+#include <linux/types.h>
 #include "stm32_flash.h"
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
diff --git a/drivers/mtd/stm32_flash.h b/drivers/mtd/stm32_flash.h
index 8cb81ef68c7..d8a95006d9e 100644
--- a/drivers/mtd/stm32_flash.h
+++ b/drivers/mtd/stm32_flash.h
@@ -1,3 +1,4 @@
+#include <asm/types.h>
 struct stm32_flash_regs {
 	u32 acr;
 	u32 key;
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 2fdf3dbc658..f3423fc2b1a 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -11,6 +11,7 @@
  * This sub-system is responsible for attaching MTD devices and it also
  * implements flash media scanning.
  *
+#include <linux/types.h>
  * The attaching information is represented by a &struct ubi_attach_info'
  * object. Information about volumes is represented by &struct ubi_ainf_volume
  * objects which are kept in volume RB-tree with root at the @volumes field.
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index f0f63ae7df0..e06f79e20f2 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -31,12 +31,14 @@
 #include <linux/slab.h>
 #include <linux/major.h>
 #else
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/log2.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <linux/err.h>
 #include <ubi_uboot.h>
diff --git a/drivers/mtd/ubi/crc32table.h b/drivers/mtd/ubi/crc32table.h
index 02ce6fd9017..3b18c183382 100644
--- a/drivers/mtd/ubi/crc32table.h
+++ b/drivers/mtd/ubi/crc32table.h
@@ -1,5 +1,6 @@
 /* this file is generated - do not edit */
 
+#include <asm/types.h>
 static const u32 crc32table_le[] = {
 tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL),
 tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L),
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index 705a05ae77d..b095abb878d 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ubi.h"
 #ifndef __UBOOT__
 #include <linux/debugfs.h>
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7f797c517b2..0cf5a6914db 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -18,6 +18,7 @@
  * accessing a logical eraseblock it is locked for reading or writing. The
  * per-logical eraseblock locking is implemented by means of the lock tree. The
  * lock tree is an RB-tree which refers all the currently locked logical
+#include <linux/types.h>
  * eraseblocks. The lock tree elements are &struct ubi_ltree_entry objects.
  * They are indexed by (@vol_id, @lnum) pairs.
  *
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 38983fb7356..0e01f06c849 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 
 #include <linux/compat.h>
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index e5dafaf5ff6..9076707baef 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -66,6 +66,7 @@
  * 512-byte chunks, we have to allocate one more buffer and copy our VID header
  * to offset 448 of this buffer.
  *
+#include <linux/types.h>
  * The I/O sub-system does the following trick in order to avoid this extra
  * copy. It always allocates a @ubi->vid_hdr_alsize bytes buffer for the VID
  * header and returns a pointer to offset @ubi->vid_hdr_shift of this buffer.
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 6574760288d..a5dcd9dd568 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -12,6 +12,7 @@
 #include <ubi_uboot.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "ubi.h"
 
 /**
diff --git a/drivers/mtd/ubi/ubi-media.h b/drivers/mtd/ubi/ubi-media.h
index 4af85c4247b..9d0e1d7889f 100644
--- a/drivers/mtd/ubi/ubi-media.h
+++ b/drivers/mtd/ubi/ubi-media.h
@@ -11,6 +11,8 @@
 
 /*
  * This file defines the layout of UBI headers and all the other UBI on-flash
+#include <compiler.h>
+#include <linux/types.h>
  * data structures.
  */
 
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index fff703a0f6c..da5298e570b 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -32,6 +32,7 @@
 #else
 #include <div64.h>
 #include <ubi_uboot.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index c9d28bb4d52..42b40d42f13 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <linux/math64.h>
 
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index b8e07872716..80d291d5c86 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -59,6 +59,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 
 #include <linux/err.h>
diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c
index 2a1ad2ca157..a353cecddf9 100644
--- a/drivers/mtd/ubispl/ubispl.c
+++ b/drivers/mtd/ubispl/ubispl.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <ubispl.h>
 
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index b82ea522a69..b6b6d2eef07 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -30,6 +31,7 @@
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <mach/ath79.h>
 
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index bf17d1fb29a..ca4cfba7389 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -26,6 +26,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "altera_tse.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/altera_tse.h b/drivers/net/altera_tse.h
index 79509b80847..497e2082f5a 100644
--- a/drivers/net/altera_tse.h
+++ b/drivers/net/altera_tse.h
@@ -11,7 +11,9 @@
 #ifndef _ALTERA_TSE_H_
 #define _ALTERA_TSE_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #define __packed_1_    __packed __aligned(1)
 
 /* dma type */
diff --git a/drivers/net/armada100_fec.h b/drivers/net/armada100_fec.h
index b0e6d02b4af..a0f4b9f6c3a 100644
--- a/drivers/net/armada100_fec.h
+++ b/drivers/net/armada100_fec.h
@@ -12,6 +12,7 @@
 #ifndef __ARMADA100_FEC_H__
 #define __ARMADA100_FEC_H__
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define PORT_NUM		0x0
 
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 26381a1bc6e..4113ab68448 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -19,6 +19,7 @@
 #include <netdev.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index d161f0e09c3..75e85742aec 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "ax88796.h"
 
 /*
diff --git a/drivers/net/ax88796.h b/drivers/net/ax88796.h
index 51060661066..462de3ce105 100644
--- a/drivers/net/ax88796.h
+++ b/drivers/net/ax88796.h
@@ -8,6 +8,7 @@
 #ifndef __DRIVERS_AX88796L_H__
 #define __DRIVERS_AX88796L_H__
 
+#include <linux/types.h>
 #define DP_DATA		(0x10 << 1)
 #define START_PG	0x40	/* First page of TX buffer */
 #define START_PG2	0x48
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index 8540b13951b..c75564dbe71 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -8,9 +8,11 @@
 #define DEBUG
 #include <linux/printk.h>
 #endif
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 
 #include <config.h>
diff --git a/drivers/net/bcm-sf2-eth-gmac.h b/drivers/net/bcm-sf2-eth-gmac.h
index 477667f4eaa..01ebccf8525 100644
--- a/drivers/net/bcm-sf2-eth-gmac.h
+++ b/drivers/net/bcm-sf2-eth-gmac.h
@@ -6,6 +6,7 @@
 #ifndef _BCM_SF2_ETH_GMAC_H_
 #define _BCM_SF2_ETH_GMAC_H_
 
+#include <linux/types.h>
 #define BCM_SF2_ETH_MAC_NAME	"gmac"
 
 #ifndef ETHHW_PORT_INT
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index db7930fb88e..63faf4bef13 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/net/bcm-sf2-eth.h b/drivers/net/bcm-sf2-eth.h
index 4f81e0431c1..b7bc1e4244a 100644
--- a/drivers/net/bcm-sf2-eth.h
+++ b/drivers/net/bcm-sf2-eth.h
@@ -8,6 +8,7 @@
 
 #include <phy.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 #define RX_BUF_SIZE	2048
 /* RX_BUF_NUM must be power of 2 */
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index afb81ab187b..d87677737ed 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dma.h>
 #include <log.h>
@@ -22,6 +23,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define ETH_RX_DESC			PKTBUFSRX
 #define ETH_MAX_MTU_SIZE		1518
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index 3f18c5c5225..d3eb8e8b6cf 100644
--- a/drivers/net/bcm6368-eth.c
+++ b/drivers/net/bcm6368-eth.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dma.h>
 #include <log.h>
@@ -24,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define ETH_PORT_STR			"brcm,enetsw-port"
 
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index ca7888af89c..5ac8054694b 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -39,6 +39,7 @@
 #include <linux/sizes.h>
 #include <asm/dma-mapping.h>
 #include <wait_bit.h>
+#include <linux/types.h>
 
 /* Register definitions derived from Linux source */
 #define SYS_REV_CTRL			0x00
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 37c3a54761b..c24056390d8 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define TX_NUM_DESC			1
 #define RX_NUM_DESC			32
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index d58ae075830..78dadd9d162 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -31,6 +31,7 @@
 #include <net.h>
 #include <malloc.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "cs8900.h"
 
 #undef DEBUG
diff --git a/drivers/net/cs8900.h b/drivers/net/cs8900.h
index 1a566ff7b2e..bfe1946a3ae 100644
--- a/drivers/net/cs8900.h
+++ b/drivers/net/cs8900.h
@@ -23,6 +23,7 @@
 
 #include <asm/types.h>
 #include <config.h>
+#include <linux/types.h>
 
 #define CS8900_DRIVERNAME "CS8900"
 /* although the registers are 16 bit, they are 32-bit aligned on the
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 3f45aebcd03..ad14a07bdb0 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -15,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SROM_DLEVEL	0
 
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index ffb41e8bf1f..ca32b7e8979 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -34,6 +34,7 @@
 #include <asm/io.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include "designware.h"
 
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index ffaf5a14d07..de051c46dd8 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -9,6 +9,7 @@
 
 #include <asm/cache.h>
 #include <net.h>
+#include <linux/types.h>
 
 #if CONFIG_IS_ENABLED(DM_GPIO)
 #include <asm-generic/gpio.h>
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 33cd6c72e19..d4eac00bae6 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -59,6 +59,7 @@ TODO: external MII is not functional, only internal at the moment.
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "dm9000x.h"
 
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 675eb88c3d9..652127f9f30 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
diff --git a/drivers/net/dnet.h b/drivers/net/dnet.h
index fdb4fd2d391..c93c9714d09 100644
--- a/drivers/net/dnet.h
+++ b/drivers/net/dnet.h
@@ -11,6 +11,7 @@
 #ifndef __DRIVERS_DNET_H__
 #define __DRIVERS_DNET_H__
 
+#include <asm/types.h>
 #define DRIVERNAME "dnet"
 
 struct dnet_registers {
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 5eb593e9eda..cca211708d7 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -8,6 +8,9 @@
 /*
  * This driver supports the Synopsys Designware Ethernet QOS (Quality Of
  * Service) IP block. The IP supports multiple options for bus type, clocking/
+#include <compiler.h>
+#include <stdbool.h>
+#include <linux/types.h>
  * reset structure, and feature list.
  *
  * The driver is written such that generic core logic is kept separate from
diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c
index cddbd56ac7d..126ba1fe93d 100644
--- a/drivers/net/dwmac_socfpga.c
+++ b/drivers/net/dwmac_socfpga.c
@@ -13,6 +13,7 @@
 #include <regmap.h>
 #include <reset.h>
 #include <syscon.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "designware.h"
 #include <dm/device_compat.h>
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 3d87e05c5b2..a157512cd96 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -39,6 +39,7 @@ tested on both gig copper and gig fiber boards
 #include <memalign.h>
 #include <net.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
@@ -46,6 +47,7 @@ tested on both gig copper and gig fiber boards
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "e1000.h"
 #include <asm/cache.h>
 
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index 2adfd38f273..75b2fff945c 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -12,6 +12,7 @@
 *******************************************************************************/
 
 /* e1000_hw.h
+#include <linux/types.h>
  * Structures, enums, and macros for the MAC
  */
 
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index 8200d428615..b5355adcb9f 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,11 +1,13 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "e1000.h"
 #include <malloc.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index d152063008b..b5c928f9425 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -19,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Ethernet chip registers. */
 #define SCB_STATUS		0	/* Rx/Command Unit Status *Word* */
diff --git a/drivers/net/ep93xx_eth.h b/drivers/net/ep93xx_eth.h
index 074fe25f347..69cd0c00c17 100644
--- a/drivers/net/ep93xx_eth.h
+++ b/drivers/net/ep93xx_eth.h
@@ -10,6 +10,7 @@
 #define _EP93XX_ETH_H
 
 #include <net.h>
+#include <linux/types.h>
 
 /**
  * #define this to dump device status and queue info during initialization and
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index c331cd9e97c..95f202e3b51 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -26,6 +27,7 @@
 #include <asm/cache.h>
 #include <wait_bit.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* register offsets */
 #define	MODER		0x00
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index bdf14afcd75..d37fc0d81d5 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <env.h>
@@ -26,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 #include <asm/io.h>
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h
index 20e1712a077..485c270ef56 100644
--- a/drivers/net/fec_mxc.h
+++ b/drivers/net/fec_mxc.h
@@ -18,6 +18,7 @@
 
 #include <clk.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 /* Layout description of the FEC */
 struct ethernet_regs {
diff --git a/drivers/net/fm/b4860.c b/drivers/net/fm/b4860.c
index 5be0ad2ab3d..43e4bde900f 100644
--- a/drivers/net/fm/b4860.c
+++ b/drivers/net/fm/b4860.c
@@ -11,6 +11,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
 #include <hwconfig.h>
+#include <asm/types.h>
 
 u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 0728ad6cacf..849b8c24a32 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
@@ -31,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index 924632c3991..6a32f538d99 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <fsl_qe.h>	/* For struct qe_firmware */
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #ifdef CONFIG_SYS_DPAA_FMAN
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 964dc01884b..64e0a692810 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #ifdef CONFIG_DM_ETH
 #include <dm.h>
diff --git a/drivers/net/fm/fm.h b/drivers/net/fm/fm.h
index 2379b3a11ca..b31c515fe82 100644
--- a/drivers/net/fm/fm.h
+++ b/drivers/net/fm/fm.h
@@ -10,6 +10,7 @@
 #include <phy.h>
 #include <fm_eth.h>
 #include <fsl_fman.h>
+#include <linux/types.h>
 
 /* Port ID */
 #define OH_PORT_ID_BASE		0x01
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index de4db412704..fe56b986514 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fm/ls1043.c b/drivers/net/fm/ls1043.c
index ba4da69423a..d476a7f14e3 100644
--- a/drivers/net/fm/ls1043.c
+++ b/drivers/net/fm/ls1043.c
@@ -7,6 +7,7 @@
 #include <fm_eth.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 
 #define FSL_CHASSIS2_RCWSR13_EC1		0xe0000000 /* bits 416..418 */
 #define FSL_CHASSIS2_RCWSR13_EC1_DTSEC3_RGMII	0x00000000
diff --git a/drivers/net/fm/ls1046.c b/drivers/net/fm/ls1046.c
index 49b540bd30b..63d8804c11c 100644
--- a/drivers/net/fm/ls1046.c
+++ b/drivers/net/fm/ls1046.c
@@ -7,6 +7,7 @@
 #include <fm_eth.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/types.h>
 
 #define FSL_CHASSIS2_RCWSR13_EC1		0xe0000000 /* bits 416..418 */
 #define FSL_CHASSIS2_RCWSR13_EC1_DTSEC3_RGMII	0x00000000
diff --git a/drivers/net/fm/memac_phy.c b/drivers/net/fm/memac_phy.c
index 79a15989ad9..85f2156efcc 100644
--- a/drivers/net/fm/memac_phy.c
+++ b/drivers/net/fm/memac_phy.c
@@ -15,6 +15,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_MEMAC_LITTLE_ENDIAN
 #define memac_out_32(a, v)	out_le32(a, v)
diff --git a/drivers/net/fm/p1023.c b/drivers/net/fm/p1023.c
index d4167e4d696..de3bc19f46a 100644
--- a/drivers/net/fm/p1023.c
+++ b/drivers/net/fm/p1023.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 static u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = MPC85xx_DEVDISR_TSEC1,
diff --git a/drivers/net/fm/p4080.c b/drivers/net/fm/p4080.c
index b78b02d8284..255e0680f34 100644
--- a/drivers/net/fm/p4080.c
+++ b/drivers/net/fm/p4080.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 static u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/p5020.c b/drivers/net/fm/p5020.c
index 81895312153..ba59775776f 100644
--- a/drivers/net/fm/p5020.c
+++ b/drivers/net/fm/p5020.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 static u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/p5040.c b/drivers/net/fm/p5040.c
index 38744e7b7b3..9d1b6bd590e 100644
--- a/drivers/net/fm/p5040.c
+++ b/drivers/net/fm/p5040.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/t1024.c b/drivers/net/fm/t1024.c
index 6fc3b903370..405b3dec7ef 100644
--- a/drivers/net/fm/t1024.c
+++ b/drivers/net/fm/t1024.c
@@ -5,10 +5,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
 #include <fm_eth.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/t1040.c b/drivers/net/fm/t1040.c
index af4f5c56107..ee6625d9afa 100644
--- a/drivers/net/fm/t1040.c
+++ b/drivers/net/fm/t1040.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 phy_interface_t fman_port_enet_if(enum fm_port port)
 {
diff --git a/drivers/net/fm/t2080.c b/drivers/net/fm/t2080.c
index f4d8d2d869a..b893ae0931c 100644
--- a/drivers/net/fm/t2080.c
+++ b/drivers/net/fm/t2080.c
@@ -6,10 +6,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
 #include <fm_eth.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/t4240.c b/drivers/net/fm/t4240.c
index f8e63c3d719..fbcfd1d6429 100644
--- a/drivers/net/fm/t4240.c
+++ b/drivers/net/fm/t4240.c
@@ -4,11 +4,13 @@
  *	Roy Zang <tie-fei.zang at freescale.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
 #include <fm_eth.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <asm/types.h>
 
 u32 port_to_devdisr[] = {
 	[FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
diff --git a/drivers/net/fm/tgec_phy.c b/drivers/net/fm/tgec_phy.c
index 7afcf01916f..deef335ce17 100644
--- a/drivers/net/fm/tgec_phy.c
+++ b/drivers/net/fm/tgec_phy.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <fsl_tgec.h>
 #include <fm_eth.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/string.h>
 
diff --git a/drivers/net/fsl-mc/dpbp.c b/drivers/net/fsl-mc/dpbp.c
index c609efb9abc..191fd8e4a72 100644
--- a/drivers/net/fsl-mc/dpbp.c
+++ b/drivers/net/fsl-mc/dpbp.c
@@ -8,6 +8,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpbp.h>
+#include <linux/types.h>
 
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
diff --git a/drivers/net/fsl-mc/dpio/dpio.c b/drivers/net/fsl-mc/dpio/dpio.c
index 8884455963d..415f49ce8b1 100644
--- a/drivers/net/fsl-mc/dpio/dpio.c
+++ b/drivers/net/fsl-mc/dpio/dpio.c
@@ -7,6 +7,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpio.h>
+#include <linux/types.h>
 
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index fb325846322..56eb6a08c2a 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -10,6 +10,7 @@
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "qbman_portal.h"
 
 /* QBMan portal management command codes */
diff --git a/drivers/net/fsl-mc/dpio/qbman_sys.h b/drivers/net/fsl-mc/dpio/qbman_sys.h
index 2d94d91129d..1a94ba5912f 100644
--- a/drivers/net/fsl-mc/dpio/qbman_sys.h
+++ b/drivers/net/fsl-mc/dpio/qbman_sys.h
@@ -20,10 +20,12 @@
 
 /* Trace the 3 different classes of read/write access to QBMan. #undef as
  * required. */
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/bug.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #undef QBMAN_CCSR_TRACE
 #undef QBMAN_CINH_TRACE
 #undef QBMAN_CENA_TRACE
diff --git a/drivers/net/fsl-mc/dpmac.c b/drivers/net/fsl-mc/dpmac.c
index 43a2ff43f88..dce22ac7531 100644
--- a/drivers/net/fsl-mc/dpmac.c
+++ b/drivers/net/fsl-mc/dpmac.c
@@ -10,6 +10,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpmac.h>
+#include <linux/types.h>
 
 int dpmac_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
diff --git a/drivers/net/fsl-mc/dpmng.c b/drivers/net/fsl-mc/dpmng.c
index 8314243f356..5ec493f5c36 100644
--- a/drivers/net/fsl-mc/dpmng.c
+++ b/drivers/net/fsl-mc/dpmng.c
@@ -4,6 +4,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpmng.h>
+#include <linux/types.h>
 #include "fsl_dpmng_cmd.h"
 
 int mc_get_version(struct fsl_mc_io *mc_io,
diff --git a/drivers/net/fsl-mc/dpni.c b/drivers/net/fsl-mc/dpni.c
index 443e430695e..60e0e55270e 100644
--- a/drivers/net/fsl-mc/dpni.c
+++ b/drivers/net/fsl-mc/dpni.c
@@ -7,6 +7,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpni.h>
+#include <linux/types.h>
 
 int dpni_prepare_cfg(const struct dpni_cfg	*cfg,
 		     uint8_t			*cfg_buf)
diff --git a/drivers/net/fsl-mc/dprc.c b/drivers/net/fsl-mc/dprc.c
index e0a2865ab8f..bf96188d19d 100644
--- a/drivers/net/fsl-mc/dprc.c
+++ b/drivers/net/fsl-mc/dprc.c
@@ -9,6 +9,7 @@
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dprc.h>
+#include <linux/types.h>
 
 int dprc_get_container_id(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
diff --git a/drivers/net/fsl-mc/dpsparser.c b/drivers/net/fsl-mc/dpsparser.c
index cfd1ba66a05..7a5e05c7cd3 100644
--- a/drivers/net/fsl-mc/dpsparser.c
+++ b/drivers/net/fsl-mc/dpsparser.c
@@ -4,6 +4,7 @@
  *
  * Copyright 2018 NXP
  */
+#include <asm/types.h>
 #include <fsl-mc/fsl_mc_sys.h>
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpsparser.h>
diff --git a/drivers/net/fsl-mc/fsl_dpmng_cmd.h b/drivers/net/fsl-mc/fsl_dpmng_cmd.h
index e18c88da097..f1ad0f3c422 100644
--- a/drivers/net/fsl-mc/fsl_dpmng_cmd.h
+++ b/drivers/net/fsl-mc/fsl_dpmng_cmd.h
@@ -6,6 +6,7 @@
 #define __FSL_DPMNG_CMD_H
 
 /* Command IDs */
+#include <linux/types.h>
 #define DPMNG_CMDID_GET_VERSION			0x8311
 
 /*                cmd, param, offset, width, type, arg_name */
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 3a82f4f065f..889f6e6f2dc 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -5,12 +5,14 @@
  */
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <errno.h>
 #include <image.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -34,6 +36,7 @@
 #include <fsl-mc/fsl_qbman_portal.h>
 #include <fsl-mc/ldpaa_wriop.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MC_RAM_BASE_ADDR_ALIGNMENT  (512UL * 1024 * 1024)
 #define MC_RAM_BASE_ADDR_ALIGNMENT_MASK	(~(MC_RAM_BASE_ADDR_ALIGNMENT - 1))
diff --git a/drivers/net/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c
index aa50e64bced..5d379d26a9e 100644
--- a/drivers/net/fsl-mc/mc_sys.c
+++ b/drivers/net/fsl-mc/mc_sys.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 a6c6e578193..9f1920c3b8c 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
 #include <asm/io.h>
@@ -21,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "fsl_enetc.h"
 
diff --git a/drivers/net/fsl_enetc.h b/drivers/net/fsl_enetc.h
index 37e7e858435..f659470da37 100644
--- a/drivers/net/fsl_enetc.h
+++ b/drivers/net/fsl_enetc.h
@@ -8,6 +8,7 @@
 #define _ENETC_H
 
 #include <linux/bitops.h>
+#include <linux/types.h>
 #define enetc_dbg(dev, fmt, args...)	debug("%s:" fmt, dev->name, ##args)
 
 /* PCI function IDs */
diff --git a/drivers/net/fsl_enetc_mdio.c b/drivers/net/fsl_enetc_mdio.c
index 282c08c82f5..8a7eff48087 100644
--- a/drivers/net/fsl_enetc_mdio.c
+++ b/drivers/net/fsl_enetc_mdio.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #include "fsl_enetc.h"
diff --git a/drivers/net/fsl_ls_mdio.c b/drivers/net/fsl_ls_mdio.c
index 6d8332d19ae..12978665905 100644
--- a/drivers/net/fsl_ls_mdio.c
+++ b/drivers/net/fsl_ls_mdio.c
@@ -9,6 +9,7 @@
 #include <miiphy.h>
 #include <asm/io.h>
 #include <fsl_memac.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_SYS_MEMAC_LITTLE_ENDIAN
 #define memac_out_32(a, v)	out_le32(a, v)
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 64c1e71ebbe..c55fd6ff3e2 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -27,6 +27,7 @@
 #include <asm/immap.h>
 #include <asm/fsl_mcdmafec.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "MCD_dma.h"
 
diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c
index 36fa90766c2..e7e2b941d16 100644
--- a/drivers/net/fsl_mdio.c
+++ b/drivers/net/fsl_mdio.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <miiphy.h>
 #include <phy.h>
 #include <fsl_mdio.h>
@@ -14,6 +15,7 @@
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_MDIO
 struct tsec_mdio_priv {
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 5a057ebb46b..e6454b975bc 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -29,6 +29,7 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include "ftgmac100.h"
 
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 569f1e40047..42247cbf37d 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -21,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ftmac100.h"
 #ifdef CONFIG_DM_ETH
diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c
index e7c7a5e885a..ebcff74fd4e 100644
--- a/drivers/net/ftmac110.c
+++ b/drivers/net/ftmac110.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <net.h>
@@ -21,6 +22,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
 #include <miiphy.h>
diff --git a/drivers/net/ftmac110.h b/drivers/net/ftmac110.h
index a792b515b44..863dff44b6a 100644
--- a/drivers/net/ftmac110.h
+++ b/drivers/net/ftmac110.h
@@ -9,6 +9,7 @@
 #ifndef _FTMAC110_H
 #define _FTMAC110_H
 
+#include <linux/types.h>
 struct ftmac110_regs {
 	uint32_t isr;    /* 0x00: Interrups Status Register */
 	uint32_t imr;    /* 0x04: Interrupt Mask Register */
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 55ce931cd2d..6d0e1363cbd 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -31,6 +31,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "designware.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 7310d6a0426..8a8b6dc6aed 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2019, Linaro Limited
  */
 
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
 #include <malloc.h>
@@ -20,6 +21,7 @@
 #include <reset.h>
 #include <wait_bit.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define STATION_ADDR_LOW		0x0000
 #define STATION_ADDR_HIGH		0x0004
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 86a97cdf573..f4ca7a1df95 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -17,6 +17,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "ks8851_mll.h"
 
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 559273e6760..1b0470a4896 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -55,6 +55,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "lan91c96.h"
 #include <net.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 4b62225968f..615c767362b 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <fsl-mc/ldpaa_wriop.h>
 #include "ldpaa_eth.h"
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.h b/drivers/net/ldpaa_eth/ldpaa_eth.h
index 2b3d31f7043..70f984dc61e 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.h
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.h
@@ -7,6 +7,7 @@
 #ifndef __LDPAA_ETH_H
 #define __LDPAA_ETH_H
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/netdevice.h>
 #include <fsl-mc/fsl_mc.h>
@@ -17,6 +18,7 @@
 #include <fsl-mc/fsl_dpio.h>
 #include <fsl-mc/fsl_qbman_portal.h>
 #include <fsl-mc/fsl_mc_private.h>
+#include <linux/types.h>
 
 
 enum ldpaa_eth_type {
diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c b/drivers/net/ldpaa_eth/ldpaa_wriop.c
index e2ad13b8975..f58bb63e3a7 100644
--- a/drivers/net/ldpaa_eth/ldpaa_wriop.c
+++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/io.h>
 #include <asm/types.h>
 #include <malloc.h>
diff --git a/drivers/net/ldpaa_eth/ls1088a.c b/drivers/net/ldpaa_eth/ls1088a.c
index 54cb16e51b1..d6ac0f40b85 100644
--- a/drivers/net/ldpaa_eth/ls1088a.c
+++ b/drivers/net/ldpaa_eth/ls1088a.c
@@ -3,7 +3,9 @@
  * Copyright 2017 NXP
  */
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
+#include <asm/types.h>
 #include <fsl-mc/ldpaa_wriop.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/drivers/net/ldpaa_eth/ls2080a.c b/drivers/net/ldpaa_eth/ls2080a.c
index 49eee044f35..efe558f536e 100644
--- a/drivers/net/ldpaa_eth/ls2080a.c
+++ b/drivers/net/ldpaa_eth/ls2080a.c
@@ -3,7 +3,9 @@
  * Copyright 2015 Freescale Semiconductor, Inc.
  */
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
+#include <asm/types.h>
 #include <fsl-mc/ldpaa_wriop.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
index a61508befc8..8d66a5fb914 100644
--- a/drivers/net/ldpaa_eth/lx2160a.c
+++ b/drivers/net/ldpaa_eth/lx2160a.c
@@ -3,7 +3,9 @@
  * Copyright 2018 NXP
  */
 #include <common.h>
+#include <compiler.h>
 #include <phy.h>
+#include <asm/types.h>
 #include <fsl-mc/ldpaa_wriop.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index dd7b2e5a007..976a69c365c 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -11,6 +11,7 @@
 #include <net.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 783a90cb1fa..836019ea917 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -4,9 +4,11 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -14,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 91ca0e03216..083f622b3f0 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #undef	ET_DEBUG
 #undef	MII_DEBUG
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
index 21e558ee816..30b843c1b10 100644
--- a/drivers/net/mcfmii.c
+++ b/drivers/net/mcfmii.c
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 cc02b5ffd45..5f03e7cffd9 100644
--- a/drivers/net/mdio_mux_i2creg.c
+++ b/drivers/net/mdio_mux_i2creg.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <miiphy.h>
 #include <i2c.h>
+#include <linux/types.h>
 
 /*
  * This driver is used for MDIO muxes driven by writing to a register of an I2C
diff --git a/drivers/net/mdio_mux_sandbox.c b/drivers/net/mdio_mux_sandbox.c
index c22882c6e8d..a8ef9e72cb6 100644
--- a/drivers/net/mdio_mux_sandbox.c
+++ b/drivers/net/mdio_mux_sandbox.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 /* macros copied over from mdio_sandbox.c */
diff --git a/drivers/net/mdio_sandbox.c b/drivers/net/mdio_sandbox.c
index 2d7c845a098..9598f0be2fa 100644
--- a/drivers/net/mdio_sandbox.c
+++ b/drivers/net/mdio_sandbox.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #define SANDBOX_PHY_ADDR	5
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 64918248131..4f6d89affe9 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <hang.h>
 #include <malloc.h>
 #include <net.h>
@@ -20,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 1aff591e3a4..4b00dca3d79 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <malloc.h>
@@ -22,6 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <dt-bindings/mscc/jr2_data.h>
 #include "mscc_xfer.h"
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index afc6260577e..81e9be4dc5d 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <malloc.h>
@@ -20,6 +21,7 @@
 #include <wait_bit.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mscc_xfer.h"
 #include "mscc_mac_table.h"
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.c b/drivers/net/mscc_eswitch/mscc_mac_table.c
index dba44318f52..49746c79318 100644
--- a/drivers/net/mscc_eswitch/mscc_mac_table.c
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.c
@@ -3,6 +3,8 @@
  * Copyright (c) 2018 Microsemi Corporation
  */
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.h b/drivers/net/mscc_eswitch/mscc_mac_table.h
index 17fed2e7925..ab01763b708 100644
--- a/drivers/net/mscc_eswitch/mscc_mac_table.h
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.h
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 
 #define ETH_LEN 6
 #define MAC_VID 1
diff --git a/drivers/net/mscc_eswitch/mscc_miim.c b/drivers/net/mscc_eswitch/mscc_miim.c
index 9d59fc53ee9..34190e71a2e 100644
--- a/drivers/net/mscc_eswitch/mscc_miim.c
+++ b/drivers/net/mscc_eswitch/mscc_miim.c
@@ -6,6 +6,7 @@
 #include <miiphy.h>
 #include <vsprintf.h>
 #include <wait_bit.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include "mscc_miim.h"
diff --git a/drivers/net/mscc_eswitch/mscc_miim.h b/drivers/net/mscc_eswitch/mscc_miim.h
index feb1f40ae55..7b67476f833 100644
--- a/drivers/net/mscc_eswitch/mscc_miim.h
+++ b/drivers/net/mscc_eswitch/mscc_miim.h
@@ -6,6 +6,8 @@
 #ifndef _MSCC_MIIM_H_
 #define _MSCC_MIIM_H_
 
+#include <compiler.h>
+#include <asm/types.h>
 struct mscc_miim_dev {
 	void __iomem *regs;
 	phys_addr_t miim_base;
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index 55abd5a984e..5234447854f 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -3,12 +3,14 @@
  * Copyright (c) 2018 Microsemi Corporation
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include "mscc_xfer.h"
 
 #define QS_XTR_FLUSH_FLUSH		GENMASK(1, 0)
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.h b/drivers/net/mscc_eswitch/mscc_xfer.h
index df507e518cf..3a46a7553e6 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.h
+++ b/drivers/net/mscc_eswitch/mscc_xfer.h
@@ -4,7 +4,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 enum mscc_regs_qs {
 	MSCC_QS_XTR_RD,
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index 170393c03f7..71b7f21f6d0 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mscc_xfer.h"
 #include "mscc_mac_table.h"
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index 8f5c43660bd..cb46a274f4d 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mscc_xfer.h"
 #include "mscc_mac_table.h"
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index f393ea7f504..babde2feac3 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <malloc.h>
@@ -21,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mscc_xfer.h"
 #include "mscc_miim.h"
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index fd619361727..105f5f18ceb 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <wait_bit.h>
@@ -33,6 +35,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Ethernet frame engine register */
 #define PDMA_RELATED		0x0800
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index f2f070548d4..aad0c609f28 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -33,6 +34,7 @@
 #include <linux/mii.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "mtk_eth.h"
 
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 45f4e004c9c..ba510d89ac0 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <net.h>
@@ -30,6 +31,7 @@
 #include <asm/byteorder.h>
 #include <asm/arch/cpu.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_ARCH_KIRKWOOD)
 #include <asm/arch/soc.h>
diff --git a/drivers/net/mvgbe.h b/drivers/net/mvgbe.h
index 4376efbfbc0..9032d323a36 100644
--- a/drivers/net/mvgbe.h
+++ b/drivers/net/mvgbe.h
@@ -19,6 +19,7 @@
 #endif
 
 /* Constants */
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define INT_CAUSE_UNMASK_ALL		0x0007ffff
 #define INT_CAUSE_UNMASK_ALL_EXT	0x0011ffff
diff --git a/drivers/net/mvmdio.c b/drivers/net/mvmdio.c
index c712043dc7d..55fed6a3df6 100644
--- a/drivers/net/mvmdio.c
+++ b/drivers/net/mvmdio.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <miiphy.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index f001ae73208..d47e9a1b0d0 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -41,6 +42,7 @@
 #include <linux/mbus.h>
 #include <asm-generic/gpio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 2d53a5cc5a8..65b7b7b87d6 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -14,8 +14,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -47,6 +49,7 @@
 #include <fdt_support.h>
 #include <linux/mdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index f705a026431..f2997925ffa 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -61,6 +61,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 828bc957fca..fa0a1329256 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -77,6 +77,7 @@ Add SNMP
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* NE2000 base header file */
 #include "ne2000_base.h"
diff --git a/drivers/net/ne2000.h b/drivers/net/ne2000.h
index 2cde6be4377..d23e186466a 100644
--- a/drivers/net/ne2000.h
+++ b/drivers/net/ne2000.h
@@ -77,6 +77,7 @@ are GPL, so this is, of course, GPL.
 #define __DRIVERS_NE2000_H__
 
 /* Enable NE2000 basic init function */
+#include <linux/types.h>
 #define NE2000_BASIC_INIT
 
 #define DP_DATA		0x10
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 34600b822ba..1dec015ba15 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -81,6 +81,7 @@ Add SNMP
 #include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
diff --git a/drivers/net/ne2000_base.h b/drivers/net/ne2000_base.h
index 0d289444b3e..70be4429823 100644
--- a/drivers/net/ne2000_base.h
+++ b/drivers/net/ne2000_base.h
@@ -108,6 +108,7 @@ are GPL, so this is, of course, GPL.
 /* timeout for tx/rx in s */
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #define TOUT 5
 /* Ether MAC address size */
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 701fc73c91e..8a92ba3004a 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_NETCONSOLE_BUFFER_SIZE
 #define CONFIG_NETCONSOLE_BUFFER_SIZE 512
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index bb07369d32f..fc92175e9f9 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -62,6 +62,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* defines */
 #define DSIZE     0x00000FFF
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index 887958fef54..3e422ff9fc8 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "pch_gbe.h"
 
 #if !defined(CONFIG_PHYLIB)
diff --git a/drivers/net/pch_gbe.h b/drivers/net/pch_gbe.h
index 57d54d4b0d5..15e35fda4b5 100644
--- a/drivers/net/pch_gbe.h
+++ b/drivers/net/pch_gbe.h
@@ -9,6 +9,7 @@
 #ifndef _PCH_GBE_H_
 #define _PCH_GBE_H_
 
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define PCH_GBE_TIMEOUT		(3 * CONFIG_SYS_HZ)
 
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index 2e7cd2b3dfc..72a8925f086 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -24,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 4a189f7b280..7946120d56c 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -16,6 +16,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 static inline void pfe_command_help(void)
diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index 3b777ea77ad..f12553393a5 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 f582f8c5af5..e79b1c0a89b 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 286594d91b9..c11eb8b8ec0 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -17,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
 #include <spi_flash.h>
diff --git a/drivers/net/pfe_eth/pfe_hw.c b/drivers/net/pfe_eth/pfe_hw.c
index fb60e605b19..93b61eadd0d 100644
--- a/drivers/net/pfe_eth/pfe_hw.c
+++ b/drivers/net/pfe_eth/pfe_hw.c
@@ -5,6 +5,7 @@
  */
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
 #include <net/pfe_eth/pfe_eth.h>
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index 429ca879112..55c563c846b 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <net.h>
 #include <linux/delay.h>
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index cfd2424ff11..5f317af8d26 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -11,12 +11,14 @@
 #include <log.h>
 #include <net.h>
 #include <phy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 dab348ccf9c..5ab45728de9 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <phy.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 1bc9b2e4e7c..94de3d80b9a 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -26,6 +26,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 91e8f6123de..f7b70f6c7b0 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <phy.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /* Broadcom BCM54xx -- taken from linux sungem_phy */
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index 8ab483cdd58..b3e84a5e2a0 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -27,6 +27,7 @@
 #elif defined(CONFIG_SYS_CORTINA_FW_IN_MMC)
 #include <mmc.h>
 #endif
+#include <linux/types.h>
 
 #ifndef CONFIG_PHYLIB_10G
 #error The Cortina PHY needs 10G support
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 3951cb00f41..08ff23f26ff 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <phy.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 987cde1fc12..499a8c193ce 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/drivers/net/phy/generic_10g.c b/drivers/net/phy/generic_10g.c
index b4384e1f781..778066a46b6 100644
--- a/drivers/net/phy/generic_10g.c
+++ b/drivers/net/phy/generic_10g.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <asm/types.h>
 
 int gen10g_shutdown(struct phy_device *phydev)
 {
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index f03b5541a97..caa245f0f64 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <phy.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index 2b7bbc8f419..57753b35435 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <micrel.h>
 #include <phy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index d19a13dd62b..9c8eec99de4 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -18,6 +18,7 @@
 #include <miiphy.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #define BB_MII_RELOCATE(v,off) (v += (v?off:0))
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 08214ccc2f6..d0ea61b4f20 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -12,8 +12,10 @@
 #include <log.h>
 #include <miiphy.h>
 #include <bitfield.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index 7e3c76923cb..69fcab12ba4 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -30,9 +30,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c
index c11ddf765f6..c8bb62fba9c 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -10,6 +10,7 @@
 #include <miiphy.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <mv88e6352.h>
diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c
index ed557355b91..d3e4082b4f9 100644
--- a/drivers/net/phy/ncsi.c
+++ b/drivers/net/phy/ncsi.c
@@ -9,10 +9,12 @@
 #include <log.h>
 #include <malloc.h>
 #include <phy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/ncsi.h>
 #include <net/ncsi-pkt.h>
 #include <asm/unaligned.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index bda41672cc9..23d534ba4f0 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -8,6 +8,7 @@
  * Based loosely off of Linux's PHY Lib
  */
 #include <common.h>
+#include <compiler.h>
 #include <console.h>
 #include <dm.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
@@ -25,6 +27,7 @@
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 2f9b50e168a..2963c21d307 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <phy.h>
 #include <linux/delay.h>
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index 7b5494eea98..d1b1f4f2fc0 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <phy.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #ifndef CONFIG_PHYLIB_10G
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index fdc67610236..9dbc1febbfa 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 /* Cicada Auxiliary Control/Status Register */
 #define MIIM_CIS82xx_AUX_CONSTAT	0x1c
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 1a7b24f0f68..68e03dc7e91 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -11,6 +11,7 @@
 #include <phy.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 84fb1f0fe2e..9c91e3468f9 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <phy.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #define MII_PHY_STATUS_SPD_MASK		0x0C00
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index 3be550e64d5..cd562286db1 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -4,6 +4,7 @@
  *
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <errno.h>
 #include <dm.h>
@@ -20,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/mii.h>
+#include <linux/types.h>
 
 #include "pic32_eth.h"
 
diff --git a/drivers/net/pic32_eth.h b/drivers/net/pic32_eth.h
index 7b873bc7728..bea05c9cb8d 100644
--- a/drivers/net/pic32_eth.h
+++ b/drivers/net/pic32_eth.h
@@ -8,6 +8,7 @@
 #define __MICROCHIP_PIC32_ETH_H_
 
 #include <linux/bitops.h>
+#include <linux/types.h>
 #include <mach/pic32.h>
 
 /* Ethernet */
diff --git a/drivers/net/pic32_mdio.c b/drivers/net/pic32_mdio.c
index d30bceb4e53..8fda01c82c5 100644
--- a/drivers/net/pic32_mdio.c
+++ b/drivers/net/pic32_mdio.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 4fb1c7b5f6b..31d9c50bab4 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -29,6 +30,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Registers */
 #define RAVB_REG_CCC		0x000
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index f3d6ea89b99..129234426f1 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -61,6 +61,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #undef DEBUG_RTL8169
 #undef DEBUG_RTL8169_TX
diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c
index 1509630b835..7b8806f91d3 100644
--- a/drivers/net/sandbox-raw-bus.c
+++ b/drivers/net/sandbox-raw-bus.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <linux/errno.h>
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index cc358428a36..c5de9410823 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -16,6 +16,7 @@
 #include <net.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index 6e119f77b29..624aed2fc3a 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -19,6 +19,7 @@
 #include <asm/test.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 3a1a7fee4bc..9d584c8934c 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2013, 2014 Renesas Electronics Corporation
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
@@ -27,6 +28,7 @@
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_ETH
 #include <clk.h>
diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h
index d197dfdc401..8ab4643772b 100644
--- a/drivers/net/sh_eth.h
+++ b/drivers/net/sh_eth.h
@@ -7,8 +7,10 @@
  * Copyright (c) 2007 Carlos Munoz <carlos at kenati.com>
  */
 
+#include <compiler.h>
 #include <netdev.h>
 #include <asm/types.h>
+#include <linux/types.h>
 
 #define SHETHER_NAME "sh_eth"
 
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 036642b223b..cc18c69e25a 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -57,6 +57,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "smc91111.h"
 #include <net.h>
 
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 2f3b8fa8079..f6bf03efbf1 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 21096bd6d32..ea55c5e063e 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <regmap.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
@@ -28,6 +29,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define AVE_GRST_DELAY_MSEC	40
 #define AVE_MIN_XMITSIZE	60
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 3216360db15..717aefeea45 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -12,6 +12,7 @@
 
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -39,6 +40,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MDIO_CMD_MII_BUSY		BIT(0)
 #define MDIO_CMD_MII_WRITE		BIT(1)
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index 4470c741fa9..84d1c30afd4 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -21,6 +21,7 @@
 #include <asm/arch/gpio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* EMAC register  */
 struct emac_regs {
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 950d1ca2122..f2dbd8b9f77 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 <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/io.h>
@@ -27,6 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/soc/ti/ti-udma.h>
+#include <linux/types.h>
 
 #include "cpsw_mdio.h"
 
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index 0b4adb1aa61..01facc156b5 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <cpsw.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 52155df2c54..2ed2ed26021 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <cpsw.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <dm/device_compat.h>
@@ -29,6 +30,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "cpsw_mdio.h"
 
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index 2e70477756a..94906268189 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -15,6 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct cpsw_mdio_regs {
 	u32	version;
diff --git a/drivers/net/ti/cpsw_mdio.h b/drivers/net/ti/cpsw_mdio.h
index dbf4a2dcacb..f8ad72216e1 100644
--- a/drivers/net/ti/cpsw_mdio.h
+++ b/drivers/net/ti/cpsw_mdio.h
@@ -8,6 +8,7 @@
 #ifndef CPSW_MDIO_H_
 #define CPSW_MDIO_H_
 
+#include <asm/types.h>
 struct cpsw_mdio;
 
 struct mii_dev *cpsw_mdio_init(const char *name, phys_addr_t mdio_base,
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c
index f909ee7aa38..dddf78187d4 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -38,6 +38,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "davinci_emac.h"
 
 unsigned int	emac_dbg = 0;
diff --git a/drivers/net/ti/davinci_emac.h b/drivers/net/ti/davinci_emac.h
index d235275772e..fdc3946ee40 100644
--- a/drivers/net/ti/davinci_emac.h
+++ b/drivers/net/ti/davinci_emac.h
@@ -10,6 +10,7 @@
 #define _DAVINCI_EMAC_H_
 /* Ethernet Min/Max packet size */
 #include <linux/kernel.h>
+#include <linux/types.h>
 #define EMAC_MIN_ETHERNET_PKT_SIZE	60
 #define EMAC_MAX_ETHERNET_PKT_SIZE	1518
 /* Buffer size (should be aligned on 32 byte and cache line) */
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index af67ec4a1c8..b30fef96b38 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <dm.h>
 #include <dm/lists.h>
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 2f9ff5ec07f..ab99cedaec5 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -7,6 +7,7 @@
  * author Andy Fleming
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <dm.h>
@@ -25,6 +26,7 @@
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_DM_ETH
 /* Default initializations for TSEC controllers. */
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 530341faa3f..01ceac63873 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -21,6 +21,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* some kernel function compatible define */
 
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index ba4793122ea..be8ff7bbd0b 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -18,6 +18,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.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 36960bf1234..10163fc62a0 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -22,6 +22,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 0da2385a92e..fd9009d444a 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 5334b61c7aa..6c0aba0e08d 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <console.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/global_data.h>
@@ -24,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index f31ce696ff0..ccb49a1fa66 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -10,6 +10,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -18,6 +19,7 @@
 #include <config.h>
 #include <console.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/io.h>
@@ -34,6 +36,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Bit/mask specification */
 #define ZYNQ_GEM_PHYMNTNC_OP_MASK	0x40020000 /* operation mask bits */
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 95c1d5065b3..9a37f3b9e62 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -13,6 +14,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -21,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "nvme.h"
 
 #define NVME_Q_DEPTH		2
diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h
index c2914e2cb05..cbc2fbe0395 100644
--- a/drivers/nvme/nvme.h
+++ b/drivers/nvme/nvme.h
@@ -7,8 +7,10 @@
 #ifndef __DRIVER_NVME_H__
 #define __DRIVER_NVME_H__
 
+#include <compiler.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct nvme_id_power_state {
 	__le16			max_power;	/* centiwatts */
diff --git a/drivers/nvme/nvme_show.c b/drivers/nvme/nvme_show.c
index 2c3d7bcfa00..531c12b3b54 100644
--- a/drivers/nvme/nvme_show.c
+++ b/drivers/nvme/nvme_show.c
@@ -10,6 +10,7 @@
 #include <memalign.h>
 #include <nvme.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "nvme.h"
 
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index 9bc45b5ddc9..794fcee4dfe 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -9,6 +9,7 @@
 #include <pch.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
 {
diff --git a/drivers/pch/pch7.c b/drivers/pch/pch7.c
index 9eb985225c8..2ea566b4b06 100644
--- a/drivers/pch/pch7.c
+++ b/drivers/pch/pch7.c
@@ -9,6 +9,7 @@
 #include <pch.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define GPIO_BASE	0x44
 #define BIOS_CTRL	0xd8
diff --git a/drivers/pch/pch9.c b/drivers/pch/pch9.c
index f36b70c53ab..6cea83e7bcf 100644
--- a/drivers/pch/pch9.c
+++ b/drivers/pch/pch9.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <pch.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define GPIO_BASE	0x48
 #define IO_BASE		0x4c
diff --git a/drivers/pch/sandbox_pch.c b/drivers/pch/sandbox_pch.c
index 28dfc03d793..f1d28013b14 100644
--- a/drivers/pch/sandbox_pch.c
+++ b/drivers/pch/sandbox_pch.c
@@ -8,6 +8,7 @@
 #include <pch.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct sandbox_pch_priv {
 	bool protect;
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 612f20714d3..37483e3b0e6 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -12,6 +12,7 @@
 #include <vsprintf.h>
 #include <asm/fsl_serdes.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index b39a6d715b7..d18fc96cb64 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -36,6 +36,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
+#include <linux/types.h>
 
 /* PCIe core registers */
 #define PCIE_CORE_CMD_STATUS_REG				0x4
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index 1ba42693a84..1f5c011913b 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -13,6 +13,7 @@
 #include <linux/libfdt.h>
 #include <pci.h>
 #include <dm/lists.h>
+#include <linux/types.h>
 
 struct sandbox_pci_emul_priv {
 	int dev_count;
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index d73c171846f..cd00023ac9b 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 e630a2a6300..b23ca71c6f8 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -25,6 +25,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define PCIECAR			0x000010
 #define PCIECCTLR		0x000018
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 1d05207b77d..b52ac4a8af7 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -26,6 +27,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "pci_internal.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index dea11138003..8b1c3872582 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <log.h>
 #include <stdio.h>
@@ -22,6 +23,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 7a9ef884c78..e284e13ff2b 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -14,6 +14,7 @@
 #include <pci.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 /* the user can define CONFIG_SYS_PCI_CACHE_LINE_SIZE to avoid problems */
 #ifndef CONFIG_SYS_PCI_CACHE_LINE_SIZE
diff --git a/drivers/pci/pci_auto_common.c b/drivers/pci/pci_auto_common.c
index 7b756b7583a..6dee803a6a4 100644
--- a/drivers/pci/pci_auto_common.c
+++ b/drivers/pci/pci_auto_common.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <log.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <linux/kernel.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 b32f7ea1f83..7eac27a32b6 100644
--- a/drivers/pci/pci_auto_old.c
+++ b/drivers/pci/pci_auto_old.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <log.h>
 #include <pci.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 /*
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
index 7ee0980bb75..4772632b280 100644
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
@@ -17,6 +18,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 const char *pci_class_str(u8 class)
 {
diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c
index 9dddca8efe0..07178516e8b 100644
--- a/drivers/pci/pci_compat.c
+++ b/drivers/pci/pci_compat.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <pci.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include "pci_internal.h"
diff --git a/drivers/pci/pci_gt64120.c b/drivers/pci/pci_gt64120.c
index bcadf4e4d88..738569042bf 100644
--- a/drivers/pci/pci_gt64120.c
+++ b/drivers/pci/pci_gt64120.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <pci.h>
 #include <pci_gt64120.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #include <asm/io.h>
diff --git a/drivers/pci/pci_indirect.c b/drivers/pci/pci_indirect.c
index 6134c22d1bc..092ee0424b9 100644
--- a/drivers/pci/pci_indirect.c
+++ b/drivers/pci/pci_indirect.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 
 #if !defined(__I386__) && !defined(CONFIG_DM_PCI)
 
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index d207f8e645b..c18bfec1abd 100644
--- a/drivers/pci/pci_mpc85xx.c
+++ b/drivers/pci/pci_mpc85xx.c
@@ -5,6 +5,7 @@
  *
  */
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/bitops.h>
 #include <asm/cpm_85xx.h>
@@ -12,6 +13,7 @@
 #include <dm.h>
 #include <asm/fsl_law.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct mpc85xx_pci_priv {
 	void __iomem		*cfg_addr;
diff --git a/drivers/pci/pci_msc01.c b/drivers/pci/pci_msc01.c
index ae312534c87..89118187dc1 100644
--- a/drivers/pci/pci_msc01.c
+++ b/drivers/pci/pci_msc01.c
@@ -10,6 +10,7 @@
 #include <pci.h>
 #include <pci_msc01.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 #define PCI_ACCESS_READ  0
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 157924001ab..e7ab4efd0bd 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -10,9 +10,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
@@ -29,6 +31,7 @@
 #include <linux/kernel.h>
 #include <linux/mbus.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 7bc1a7f4def..292b91c88e7 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <bios_emul.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
@@ -34,6 +35,7 @@
 #include <malloc.h>
 #include <pci.h>
 #include <pci_rom.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vbe.h>
@@ -45,6 +47,7 @@
 #include <linux/kernel.h>
 #include <linux/screen_info.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index 4af0bf73034..253f47926a0 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <pci.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define FDT_DEV_INFO_CELLS	4
 #define FDT_DEV_INFO_SIZE	(FDT_DEV_INFO_CELLS * sizeof(u32))
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index d5d1147f37d..0c7644fdfad 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -15,6 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 ed0834a984e..f9a5b1127f0 100644
--- a/drivers/pci/pci_sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 28b6aa026b1..c07b4390188 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
@@ -27,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/pci/pci_x86.c b/drivers/pci/pci_x86.c
index 8d036930e73..15da7bafdcf 100644
--- a/drivers/pci/pci_x86.c
+++ b/drivers/pci/pci_x86.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <pci.h>
 #include <asm/pci.h>
+#include <linux/types.h>
 
 static int _pci_x86_read_config(const struct udevice *bus, pci_dev_t bdf,
 				uint offset, ulong *valuep,
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
index 3f207f0de11..aef50954b18 100644
--- a/drivers/pci/pcie_brcmstb.c
+++ b/drivers/pci/pcie_brcmstb.c
@@ -13,8 +13,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/ofnode.h>
 #include <pci.h>
@@ -24,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/iopoll.h>
+#include <linux/types.h>
 
 /* Offset of the mandatory PCIe capability config registers */
 #define BRCM_PCIE_CAP_REGS				0x00ac
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index 7eb4461ce26..2f85d98d774 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index cc968fe2a3f..4e45f8f5ca2 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <pci.h>
 #include <generic-phy.h>
 #include <power-domain.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <time.h>
@@ -22,6 +24,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c
index 4039284f539..605b0cbd315 100644
--- a/drivers/pci/pcie_ecam_generic.c
+++ b/drivers/pci/pcie_ecam_generic.c
@@ -10,9 +10,11 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index 2c9448c463c..f5c5ee3c3b8 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/fsl_pci.h>
 #include <asm/fsl_serdes.h>
@@ -20,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "pcie_fsl.h"
 #include <dm/device_compat.h>
 
diff --git a/drivers/pci/pcie_fsl.h b/drivers/pci/pcie_fsl.h
index 381185133d8..6631d5d9c8c 100644
--- a/drivers/pci/pcie_fsl.h
+++ b/drivers/pci/pcie_fsl.h
@@ -10,7 +10,9 @@
 #define _PCIE_FSL_H_
 
 /* GPEX CSR */
+#include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #define CSR_CLASSCODE			0x474
 
 #ifdef CONFIG_SYS_FSL_PCI_VER_3_X
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index 07c0695409c..e7278809a5f 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -10,10 +10,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <init.h>
 #include <log.h>
 #include <malloc.h>
 #include <pci.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
@@ -28,6 +30,7 @@
 #include <errno.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define PCI_ACCESS_READ  0
 #define PCI_ACCESS_WRITE 1
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 9af0b8a105f..7c118f7cdd3 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <pci.h>
 #include <stdbool.h>
@@ -16,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 9369457b8e7..099e839632b 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clock.h>
 #endif
 #include <asm/u-boot.h>
+#include <linux/types.h>
 #include "pcie_layerscape.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_layerscape.h b/drivers/pci/pcie_layerscape.h
index a0a1bc3172f..a5979baecbc 100644
--- a/drivers/pci/pcie_layerscape.h
+++ b/drivers/pci/pcie_layerscape.h
@@ -7,9 +7,11 @@
 
 #ifndef _PCIE_LAYERSCAPE_H_
 #define _PCIE_LAYERSCAPE_H_
+#include <compiler.h>
 #include <pci.h>
 #include <dm.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/sizes.h>
 
 #ifndef CONFIG_SYS_PCI_MEMORY_BUS
diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index 3993c60d1ad..844ad48816f 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -17,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/log2.h>
+#include <linux/types.h>
 #include "pcie_layerscape.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index 6cab1f0f99b..74ed8dbb15a 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -20,6 +20,7 @@
 #endif
 #include <asm/u-boot.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "pcie_layerscape.h"
 #include "pcie_layerscape_fixup_common.h"
 
diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index d4d5bba8523..0eed44c689d 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "pcie_layerscape_fixup_common.h"
 
 void ft_pci_setup(void *blob, struct bd_info *bd)
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index 7046960c77a..ea68f39d50b 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/fsl_serdes.h>
 #include <pci.h>
@@ -19,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 #include "pcie_layerscape_gen4.h"
 
diff --git a/drivers/pci/pcie_layerscape_gen4.h b/drivers/pci/pcie_layerscape_gen4.h
index 8fcc03afba2..2ace295f9f5 100644
--- a/drivers/pci/pcie_layerscape_gen4.h
+++ b/drivers/pci/pcie_layerscape_gen4.h
@@ -8,9 +8,11 @@
 
 #ifndef _PCIE_LAYERSCAPE_GEN4_H_
 #define _PCIE_LAYERSCAPE_GEN4_H_
+#include <compiler.h>
 #include <pci.h>
 #include <dm.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 #ifndef CONFIG_SYS_PCI_MEMORY_SIZE
diff --git a/drivers/pci/pcie_layerscape_gen4_fixup.c b/drivers/pci/pcie_layerscape_gen4_fixup.c
index be70a9a8b57..7392471c26f 100644
--- a/drivers/pci/pcie_layerscape_gen4_fixup.c
+++ b/drivers/pci/pcie_layerscape_gen4_fixup.c
@@ -19,6 +19,7 @@
 #ifdef CONFIG_ARM
 #include <asm/arch/clock.h>
 #endif
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
 #include "pcie_layerscape_gen4.h"
diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c
index 18d025d3b16..07003f9f29b 100644
--- a/drivers/pci/pcie_layerscape_rc.c
+++ b/drivers/pci/pcie_layerscape_rc.c
@@ -20,6 +20,7 @@
 #include <asm/arch/clock.h>
 #endif
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "pcie_layerscape.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index 29d82739486..775e6a463bd 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
@@ -23,6 +24,7 @@
 #include <linux/iopoll.h>
 #include <linux/list.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* PCIe shared registers */
 #define PCIE_SYS_CFG		0x00
diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c
index 3d91706ccf1..39c65fe074a 100644
--- a/drivers/pci/pcie_phytium.c
+++ b/drivers/pci/pcie_phytium.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /**
  * struct phytium_pcie - phytium PCIe controller state
diff --git a/drivers/pci/pcie_rockchip.c b/drivers/pci/pcie_rockchip.c
index 460d74a3088..e6b90167796 100644
--- a/drivers/pci/pcie_rockchip.c
+++ b/drivers/pci/pcie_rockchip.c
@@ -20,6 +20,7 @@
 #include <pci.h>
 #include <power-domain.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <reset.h>
 #include <syscon.h>
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 1bce36bc95e..a1fd61179a7 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -13,6 +13,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 
diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c
index 8e672e812d1..0d0912f1bc3 100644
--- a/drivers/pci_endpoint/pci_ep-uclass.c
+++ b/drivers/pci_endpoint/pci_ep-uclass.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <pci_ep.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci_endpoint/pcie-cadence-ep.c b/drivers/pci_endpoint/pcie-cadence-ep.c
index 66c7dece310..268cda83a43 100644
--- a/drivers/pci_endpoint/pcie-cadence-ep.c
+++ b/drivers/pci_endpoint/pcie-cadence-ep.c
@@ -8,11 +8,13 @@
 #include <dm.h>
 #include <errno.h>
 #include <pci_ep.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/log2.h>
+#include <linux/types.h>
 #include "pcie-cadence.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci_endpoint/pcie-cadence.h b/drivers/pci_endpoint/pcie-cadence.h
index 8a659c36aa2..b74e37d1cae 100644
--- a/drivers/pci_endpoint/pcie-cadence.h
+++ b/drivers/pci_endpoint/pcie-cadence.h
@@ -12,8 +12,10 @@
 #define PCIE_CADENCE_H
 
 #include <common.h>
+#include <compiler.h>
 #include <pci_ep.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /*
diff --git a/drivers/pci_endpoint/sandbox-pci_ep.c b/drivers/pci_endpoint/sandbox-pci_ep.c
index 59c330066d7..f5b26de5e3a 100644
--- a/drivers/pci_endpoint/sandbox-pci_ep.c
+++ b/drivers/pci_endpoint/sandbox-pci_ep.c
@@ -11,6 +11,7 @@
 #include <asm/test.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct sandbox_pci_ep_priv - private data for driver
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 17c2de2caee..89c466e10d8 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -12,8 +12,10 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <dm/device.h>
 #include <generic-phy.h>
@@ -29,6 +31,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define REG_ISCR			0x00
 #define REG_PHYCTL_A10			0x04
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index f6b7e4c1ca5..f26ff381c1a 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index 13031b886d4..b3f02eb5fc1 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index aaa32315fa7..d8b9fcec85b 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 3bd4d688419..eaeba233ce7 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
@@ -20,6 +21,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 2806ee50ead..f4c07430025 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -5,8 +5,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <generic-phy.h>
 #include <asm/io.h>
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index 696b36d40c9..6a20d1721e4 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index 99f68fff12c..f5f9d579980 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -6,11 +6,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/phy/marvell/comphy_core.h b/drivers/phy/marvell/comphy_core.h
index 58c5c2fabdc..12a19bc83cc 100644
--- a/drivers/phy/marvell/comphy_core.h
+++ b/drivers/phy/marvell/comphy_core.h
@@ -6,8 +6,10 @@
 #ifndef _COMPHY_CORE_H_
 #define _COMPHY_CORE_H_
 
+#include <compiler.h>
 #include <fdtdec.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <mvebu/comphy.h>
 
 #if defined(DEBUG)
diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index 532ae928a8c..ab2163978d2 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <stdbool.h>
@@ -12,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 
diff --git a/drivers/phy/marvell/comphy_mux.c b/drivers/phy/marvell/comphy_mux.c
index 98327557a89..96ff0399b43 100644
--- a/drivers/phy/marvell/comphy_mux.c
+++ b/drivers/phy/marvell/comphy_mux.c
@@ -4,8 +4,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "comphy_core.h"
 #include "comphy_hpipe.h"
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 02feae1e2cd..f354fd58414 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -20,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 8a06bc5aadb..770422dddf1 100644
--- a/drivers/phy/meson-gxbb-usb2.c
+++ b/drivers/phy/meson-gxbb-usb2.c
@@ -14,6 +14,7 @@
 #include <generic-phy.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <regmap.h>
 #include <reset.h>
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index ebfde063ee8..476a6f15ecc 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <clk.h>
 #include <linux/usb/otg.h>
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index f566ef78663..3afab512acc 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -18,6 +18,7 @@
 #include <clk.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <linux/usb/otg.h>
 
 #include <asm/arch/usb-gx.h>
diff --git a/drivers/phy/msm8916-usbh-phy.c b/drivers/phy/msm8916-usbh-phy.c
index 5883926f087..e3e2d90da37 100644
--- a/drivers/phy/msm8916-usbh-phy.c
+++ b/drivers/phy/msm8916-usbh-phy.c
@@ -4,8 +4,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <usb/ehci-ci.h>
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 8c05e5e00df..292c6e055f0 100644
--- a/drivers/phy/mt76x8-usb-phy.c
+++ b/drivers/phy/mt76x8-usb-phy.c
@@ -8,11 +8,13 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
 #include <reset.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index df9ee140291..aec83a96d93 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -18,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT	BIT(0)
 #define OMAP_USB2_DISABLE_CHG_DET		BIT(1)
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 375a7575b77..745b616c2f9 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -7,11 +7,13 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/phy/phy-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index db32d3b1a41..16edcc9e036 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -16,6 +16,7 @@
 #include <syscon.h>
 #include <usb.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 4b7cd602c26..e3c13c5585c 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <usb.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index fa22b714540..11d5f7346d1 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -10,6 +10,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/types.h>
 #include <dm/device.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 008f1f629a8..b78712bbbb5 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -22,6 +22,7 @@
 #include <linux/iopoll.h>
 #include <asm/arch-rockchip/clock.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c
index fc7801224ac..c9106f19f4f 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/iopoll.h>
 #include <asm/arch-rockchip/clock.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index 00a0e4d4313..682cb141d33 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -10,7 +10,9 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
@@ -24,6 +26,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index 91ba53f8bdb..fe352c59fe6 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -13,6 +14,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <generic-phy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index 96a573add48..f1a5824811b 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <asm/global_data.h>
@@ -19,6 +20,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* PLLCTRL Registers */
 #define PLL_STATUS              0x00000004
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index 040247c68a1..3ba3a67f118 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/pinctrl.h>
 #include <asm/arch/scu_ast2500.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index dce17402440..6fb80f2ea73 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index 1e11eb863ca..b6a9e4a0028 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
index a7c928c71e3..ea1477dcbc8 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <dm/device-internal.h>
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
index 2f871b611fd..fc17d4c6f01 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
@@ -8,6 +8,7 @@
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define BCM6838_CMD_LOAD_MUX            0x21
 
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos.c b/drivers/pinctrl/exynos/pinctrl-exynos.c
index 4a49519416c..d53eeed756e 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include "pinctrl-exynos.h"
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos7420.c b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
index 18de9f7762c..5f6064f3a7e 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos7420.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
@@ -15,6 +15,7 @@
 #include <asm/arch/pinmux.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinctrl-exynos.h"
 
 #define	GPD1_OFFSET	0xc0
diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c
index aa261a8bdc5..9000a97427f 100644
--- a/drivers/pinctrl/intel/pinctrl.c
+++ b/drivers/pinctrl/intel/pinctrl.c
@@ -33,6 +33,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define GPIO_DW_SIZE(x)			(sizeof(u32) * (x))
 #define PAD_CFG_OFFSET(x, dw_num)	((x) + GPIO_DW_SIZE(dw_num))
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 362c7d47726..1672e6242d9 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
index def643c5d5b..5c51acfb6c2 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
@@ -6,6 +6,8 @@
 #ifndef __PINCTRL_MEDIATEK_H__
 #define __PINCTRL_MEDIATEK_H__
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define MTK_PINCTRL_V0 0x0
 #define MTK_PINCTRL_V1 0x1
diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.c b/drivers/pinctrl/meson/pinctrl-meson-axg.c
index a2bed97accf..7987b176bc6 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-axg.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-axg.c
@@ -12,6 +12,7 @@
 #include <dm/pinctrl.h>
 #include <dt-bindings/gpio/meson-axg-gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-meson-axg.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson-g12a.c b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
index 2a38e321496..dcdafa114b9 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-g12a.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
@@ -13,6 +13,7 @@
 #include <dm/pinctrl.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-meson-axg.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
index 3d896cc1303..1c053c4d908 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
@@ -3,11 +3,13 @@
  * (C) Copyright 2016 - Beniamino Galvani <b.galvani at gmail.com>
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <vsprintf.h>
 #include <asm/gpio.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb755d6cfc5..f77ca812050 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -11,6 +11,7 @@
 #include <dm/pinctrl.h>
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-meson-gx.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index f28f07bce1a..77d8edd161d 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -11,6 +11,7 @@
 #include <dm/pinctrl.h>
 #include <dt-bindings/gpio/meson-gxl-gpio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-meson-gx.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index ad44da1e8bb..7c5922d41c7 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h
index eb33d93f506..4dc963387a2 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.h
+++ b/drivers/pinctrl/meson/pinctrl-meson.h
@@ -6,6 +6,7 @@
 #ifndef __PINCTRL_MESON_H__
 #define __PINCTRL_MESON_H__
 
+#include <compiler.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 
diff --git a/drivers/pinctrl/mscc/mscc-common.c b/drivers/pinctrl/mscc/mscc-common.c
index 308f23b742d..84f154b6167 100644
--- a/drivers/pinctrl/mscc/mscc-common.c
+++ b/drivers/pinctrl/mscc/mscc-common.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <config.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/pinctrl/mscc/mscc-common.h b/drivers/pinctrl/mscc/mscc-common.h
index 3c5c1faf840..ddd41adc2b8 100644
--- a/drivers/pinctrl/mscc/mscc-common.h
+++ b/drivers/pinctrl/mscc/mscc-common.h
@@ -7,6 +7,7 @@
  * Copyright (c) 2017 Microsemi Corporation
  */
 
+#include <compiler.h>
 #define MSCC_FUNC_PER_PIN	4
 
 enum mscc_regs_gpio {
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
index 4ea1e853f78..49a26b9afc3 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
@@ -6,8 +6,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
index ad9bd0311cc..1964d8012fe 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
index 25ca19ff6ab..540e4d7a85a 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
@@ -9,6 +9,8 @@
 #define _PINCTRL_MTMIPS_COMMON_H_
 
 #include <common.h>
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 
 struct mtmips_pmx_func {
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 52b6c9242ae..343139533b1 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -17,6 +17,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <config.h>
 #include <dm.h>
 #include <malloc.h>
@@ -41,6 +42,7 @@
 #include <linux/libfdt.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index e5820375393..5f40b00daef 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <asm/system.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h
index 54ad69e8ba8..5ed0b63a49b 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h
@@ -4,6 +4,7 @@
  * https://spdx.org/licenses
  */
 
+#include <linux/types.h>
  #ifndef __PINCTRL_MVEBU_H_
  #define __PINCTRL_MVEBU_H_
 
diff --git a/drivers/pinctrl/nexell/pinctrl-nexell.c b/drivers/pinctrl/nexell/pinctrl-nexell.c
index da5ca6846cf..0e379ce98fe 100644
--- a/drivers/pinctrl/nexell/pinctrl-nexell.c
+++ b/drivers/pinctrl/nexell/pinctrl-nexell.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include "pinctrl-nexell.h"
 #include "pinctrl-s5pxx18.h"
diff --git a/drivers/pinctrl/nexell/pinctrl-nexell.h b/drivers/pinctrl/nexell/pinctrl-nexell.h
index b21eefcabef..35c870808f2 100644
--- a/drivers/pinctrl/nexell/pinctrl-nexell.h
+++ b/drivers/pinctrl/nexell/pinctrl-nexell.h
@@ -10,6 +10,7 @@
 #define __PINCTRL_NEXELL_H_
 
 /**
+#include <asm/types.h>
  * struct nexell_pin_bank_data: represent a controller pin-bank data.
  * @offset: starting offset of the pin-bank registers.
  * @nr_pins: number of pins included in this bank.
diff --git a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
index 08a97ae378b..93a01cb9101 100644
--- a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
+++ b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
@@ -10,11 +10,13 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "pinctrl-nexell.h"
 #include "pinctrl-s5pxx18.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 6db7313aecd..09cdb17ea79 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.h b/drivers/pinctrl/nxp/pinctrl-imx.h
index 947975ee72a..0cb1f03c460 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.h
+++ b/drivers/pinctrl/nxp/pinctrl-imx.h
@@ -12,6 +12,8 @@
  * @flags: flags specific for each soc
  * @mux_mask: Used when SHARE_MUX_CONF_REG flag is added
  */
+#include <compiler.h>
+#include <asm/types.h>
 struct imx_pinctrl_soc_info {
 	void __iomem *base;
 	void __iomem *input_sel_base;
diff --git a/drivers/pinctrl/nxp/pinctrl-imx5.c b/drivers/pinctrl/nxp/pinctrl-imx5.c
index 9c3423bef37..645cd2f660c 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx5.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx5.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx6.c b/drivers/pinctrl/nxp/pinctrl-imx6.c
index aafa3057ada..0c78cfcd533 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx6.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx6.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx7.c b/drivers/pinctrl/nxp/pinctrl-imx7.c
index 66b58ba472c..4b67e43aeca 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx7.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx7.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx7ulp.c b/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
index 598bbfaf350..f2fcb93e7e4 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx8.c b/drivers/pinctrl/nxp/pinctrl-imx8.c
index 7af9506d504..8a76eafa79e 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx8.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx8.c
@@ -7,6 +7,7 @@
 #include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx8m.c b/drivers/pinctrl/nxp/pinctrl-imx8m.c
index 0626fde58f1..4703c902c2c 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx8m.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx8m.c
@@ -5,6 +5,7 @@
 
 #include <dm/device.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imxrt.c b/drivers/pinctrl/nxp/pinctrl-imxrt.c
index 4a939419275..f06e4d0cc39 100644
--- a/drivers/pinctrl/nxp/pinctrl-imxrt.c
+++ b/drivers/pinctrl/nxp/pinctrl-imxrt.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 6cb6977812a..5ed65fb5269 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
@@ -15,6 +16,7 @@
 #include <dm.h>
 #include <dm/pinctrl.h>
 #include <dm/read.h>
+#include <linux/types.h>
 #include "pinctrl-mxs.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.h b/drivers/pinctrl/nxp/pinctrl-mxs.h
index a398e43cbeb..62f8e139361 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.h
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.h
@@ -6,6 +6,8 @@
 #ifndef __PINCTRL_MXS_H
 #define __PINCTRL_MXS_H
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 
 #define SET	0x4
diff --git a/drivers/pinctrl/nxp/pinctrl-scu.c b/drivers/pinctrl/nxp/pinctrl-scu.c
index 81f6eb56db3..7981f24a952 100644
--- a/drivers/pinctrl/nxp/pinctrl-scu.c
+++ b/drivers/pinctrl/nxp/pinctrl-scu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <errno.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <asm/io.h>
 #include <asm/arch/sci/sci.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-vf610.c b/drivers/pinctrl/nxp/pinctrl-vf610.c
index e795b5fd8ac..eed6717122b 100644
--- a/drivers/pinctrl/nxp/pinctrl-vf610.c
+++ b/drivers/pinctrl/nxp/pinctrl-vf610.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/types.h>
 
 #include "pinctrl-imx.h"
 
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 02f8d94f12d..0d701e79eac 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 819c5723fa5..9b3251e957a 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <asm/hardware.h>
@@ -17,6 +18,7 @@
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/at91_pio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/pinctrl-generic.c b/drivers/pinctrl/pinctrl-generic.c
index a8a78020d0a..896869e6a83 100644
--- a/drivers/pinctrl/pinctrl-generic.c
+++ b/drivers/pinctrl/pinctrl-generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/compat.h>
 #include <dm/pinctrl.h>
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 24387e59f1e..298a8dda03e 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index 7549253e061..1a3c892e83a 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -15,6 +15,7 @@
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index b72374cd09c..ac6bad745e6 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -21,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 /* STMFX pins = GPIO[15:0] + aGPIO[7:0] */
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 817ea3f3323..40afc7cb0f7 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <dm/device_compat.h>
@@ -17,6 +18,7 @@
 #include <dm/pinctrl.h>
 #include <dm/util.h>
 #include <dm/of_access.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index 939760d5bb1..8789e4e6337 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -5,12 +5,14 @@
  * Written by Purna Chandra Mandal <purna.mandal at microchip.com>
  */
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 98cf5b5aa5b..d9f018e7853 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 91d220fe475..5677f4e51f5 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -6,9 +6,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a7790.c b/drivers/pinctrl/renesas/pfc-r8a7790.c
index 30e9a117f8d..230a5b8569c 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7790.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7790.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a7791.c b/drivers/pinctrl/renesas/pfc-r8a7791.c
index 7ae6e4081c0..722c6e677a2 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7791.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7791.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a7792.c b/drivers/pinctrl/renesas/pfc-r8a7792.c
index 1c904120937..e2babffc6aa 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7792.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7792.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r8a7794.c b/drivers/pinctrl/renesas/pfc-r8a7794.c
index e59fd7656e0..c823af776a7 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7794.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7794.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a7795.c b/drivers/pinctrl/renesas/pfc-r8a7795.c
index ba17a557752..1e7e5f0d91a 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7795.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7795.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r8a7796.c b/drivers/pinctrl/renesas/pfc-r8a7796.c
index a92c8ad18c1..75b68c7bde6 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7796.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7796.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r8a77965.c b/drivers/pinctrl/renesas/pfc-r8a77965.c
index 2523904aec1..8733ca80f39 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77965.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77965.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r8a77970.c b/drivers/pinctrl/renesas/pfc-r8a77970.c
index 9996eb9298c..808a82f56b8 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77970.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77970.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a77980.c b/drivers/pinctrl/renesas/pfc-r8a77980.c
index 1b04250e527..da5718ec0db 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77980.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77980.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a77990.c b/drivers/pinctrl/renesas/pfc-r8a77990.c
index e0bf1e4a300..e3957d2f1f9 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77990.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77990.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a77995.c b/drivers/pinctrl/renesas/pfc-r8a77995.c
index 724cf4ae3c9..f5701c5fc9f 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77995.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77995.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 5d7486574cc..12d162a4d2b 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -12,8 +12,10 @@
 #define DRV_NAME "sh-pfc"
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
@@ -24,6 +26,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 #include "sh_pfc.h"
 
diff --git a/drivers/pinctrl/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h
index feea8a45ff6..546d0545d42 100644
--- a/drivers/pinctrl/renesas/sh_pfc.h
+++ b/drivers/pinctrl/renesas/sh_pfc.h
@@ -11,6 +11,8 @@
 #ifndef __SH_PFC_H
 #define __SH_PFC_H
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index bbe50160722..6896507eed7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index 77bd12e4c79..03a572bbe42 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index dc44f784080..0cf6e0467a8 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 4b919e9cffc..393a7ad401d 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -11,6 +11,7 @@
 #include <syscon.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index 2ae92e258b7..6da0afdf002 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 8c22a56b620..40649cb6416 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index afd9bd3e85d..c8d1018adb4 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 42075627f96..816a750e065 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index 5fbc0635964..ed7ab2bdbba 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -11,6 +11,7 @@
 #include <syscon.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index 084941c6706..13f0d20ab46 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index f36e49f36a4..3d2bb42f2ec 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -6,7 +6,9 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 42db3375d04..0378ae61779 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index 44a1571db4f..2f0f288e6ff 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index 5951835d6e8..c82b84484a6 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -7,6 +7,7 @@
 #ifndef __PINCTRL_UNIPHIER_H__
 #define __PINCTRL_UNIPHIER_H__
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/build_bug.h>
diff --git a/drivers/power/acpi_pmc/acpi-pmc-uclass.c b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
index f13e27f34cb..90699d3ef07 100644
--- a/drivers/power/acpi_pmc/acpi-pmc-uclass.c
+++ b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
@@ -16,6 +16,7 @@
 #endif
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/acpi_pmc.h>
 
 struct tco_regs {
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index de6afccea12..29c99c47f66 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -13,6 +13,7 @@
 #include <asm/test.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/acpi_pmc.h>
 
 /**
diff --git a/drivers/power/acpi_pmc/sandbox.c b/drivers/power/acpi_pmc/sandbox.c
index 667b7a5daf5..e6f31c215b2 100644
--- a/drivers/power/acpi_pmc/sandbox.c
+++ b/drivers/power/acpi_pmc/sandbox.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/acpi_pmc.h>
 
 #define GPIO_GPE_CFG		0x1050
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index bf07232b08d..3db5c75e294 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static u8 axp152_mvolt_to_target(int mvolt, int min, int max, int div)
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 878ccf45906..43043fbac2f 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 <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index e0249796729..07751cc3038 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static u8 axp221_mvolt_to_cfg(int mvolt, int min, int max, int div)
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index 7999ab593a8..5ca0bb32549 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -17,6 +17,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static u8 axp809_mvolt_to_cfg(int mvolt, int min, int max, int div)
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index 340472d75c7..32c3e1df311 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -17,6 +17,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 static u8 axp818_mvolt_to_cfg(int mvolt, int min, int max, int div)
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
index 21933018fc4..10ce80f0317 100644
--- a/drivers/power/domain/bcm6328-power-domain.c
+++ b/drivers/power/domain/bcm6328-power-domain.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c
index b0107dff1f8..65e4cda8599 100644
--- a/drivers/power/domain/imx8-power-domain.c
+++ b/drivers/power/domain/imx8-power-domain.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <asm/arch/power-domain.h>
 #include <asm/arch/sci/sci.h>
+#include <asm/types.h>
 
 static int imx8_power_domain_request(struct power_domain *power_domain)
 {
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index f6082f2a4c0..a839716c7d4 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -10,9 +10,11 @@
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <reset.h>
 #include <clk.h>
+#include <asm/types.h>
 #include <dt-bindings/power/meson-g12a-power.h>
 #include <dt-bindings/power/meson-sm1-power.h>
 #include <linux/bitops.h>
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index 78ac99e8d9b..aa0c9cf461b 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <reset.h>
 #include <clk.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c
index d8467ac6c26..f79fe6ea0d3 100644
--- a/drivers/power/domain/mtk-power-domain.c
+++ b/drivers/power/domain/mtk-power-domain.c
@@ -6,6 +6,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
@@ -13,6 +14,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/power/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c
index fd90f4926db..2bef8867ddf 100644
--- a/drivers/power/domain/ti-sci-power-domain.c
+++ b/drivers/power/domain/ti-sci-power-domain.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <dt-bindings/soc/ti,sci_pm_domain.h>
+#include <linux/types.h>
 
 /**
  * struct ti_sci_power_domain_data - pm domain controller information structure
diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c
index e714add9995..139cdad1da5 100644
--- a/drivers/power/exynos-tmu.c
+++ b/drivers/power/exynos-tmu.c
@@ -26,6 +26,7 @@
 #include <asm/arch/tmu.h>
 #include <asm/arch/power.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define TRIMINFO_RELOAD		1
 #define CORE_EN			1
diff --git a/drivers/power/fuel_gauge/fg_max17042.c b/drivers/power/fuel_gauge/fg_max17042.c
index a0614e229a1..be8f129bffa 100644
--- a/drivers/power/fuel_gauge/fg_max17042.c
+++ b/drivers/power/fuel_gauge/fg_max17042.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/power/mfd/fg_max77693.c b/drivers/power/mfd/fg_max77693.c
index e96e5907628..c56841240f8 100644
--- a/drivers/power/mfd/fg_max77693.c
+++ b/drivers/power/mfd/fg_max77693.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
 #include <power/max77693_fg.h>
diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c
index 21e62755983..6ecd5f79437 100644
--- a/drivers/power/mt6323.c
+++ b/drivers/power/mt6323.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #define PWRAP_BASE		0x1000d000
diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c
index c716e4ff10d..47415f11e35 100644
--- a/drivers/power/palmas.c
+++ b/drivers/power/palmas.c
@@ -7,6 +7,7 @@
 #include <palmas.h>
 #include <stdio.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 void palmas_init_settings(void)
 {
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 7bd69ccc0b4..daa27575ac9 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
+#include <linux/types.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 9152f657ff7..9286d2d372c 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -14,6 +14,7 @@
 #include <dm/lists.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
 
diff --git a/drivers/power/pmic/as3722_gpio.c b/drivers/power/pmic/as3722_gpio.c
index 6b091a58b8b..e2eb914ea68 100644
--- a/drivers/power/pmic/as3722_gpio.c
+++ b/drivers/power/pmic/as3722_gpio.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <power/as3722.h>
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index 35d5018a391..b8ec6248292 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 13b7503aedb..d92fd6b3d13 100644
--- a/drivers/power/pmic/da9063.c
+++ b/drivers/power/pmic/da9063.c
@@ -10,9 +10,11 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.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 256c455aa29..c28985a7890 100644
--- a/drivers/power/pmic/fan53555.c
+++ b/drivers/power/pmic/fan53555.c
@@ -12,6 +12,7 @@
 #include <i2c.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/fan53555.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index ce68fdb043a..73b70cd53d0 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 4addcf9cbd1..b4537202a80 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 c4bf1aff78c..7e4c8c39985 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 2c83aab57a8..39a25eb3fce 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/max77686_pmic.h>
diff --git a/drivers/power/pmic/max8997.c b/drivers/power/pmic/max8997.c
index 504a63bf743..1e23a26e8df 100644
--- a/drivers/power/pmic/max8997.c
+++ b/drivers/power/pmic/max8997.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/max8997_pmic.h>
 #include <errno.h>
diff --git a/drivers/power/pmic/max8998.c b/drivers/power/pmic/max8998.c
index d155474447f..dd80d1738c0 100644
--- a/drivers/power/pmic/max8998.c
+++ b/drivers/power/pmic/max8998.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/max8998_pmic.h>
 
diff --git a/drivers/power/pmic/mc34708.c b/drivers/power/pmic/mc34708.c
index df66038d68d..6657f2f089e 100644
--- a/drivers/power/pmic/mc34708.c
+++ b/drivers/power/pmic/mc34708.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 0b4366a2715..a165a045486 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 6e80c5cdc4f..31f0d474c3a 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 0955d46fc78..27c5b628cbe 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/pfuze100_pmic.h>
diff --git a/drivers/power/pmic/pm8916.c b/drivers/power/pmic/pm8916.c
index c47c89754d1..1f97cc65f81 100644
--- a/drivers/power/pmic/pm8916.c
+++ b/drivers/power/pmic/pm8916.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <spmi/spmi.h>
 
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 257e514b10b..b185de39de0 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -15,6 +15,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <linux/ctype.h>
 
diff --git a/drivers/power/pmic/pmic_hi6553.c b/drivers/power/pmic/pmic_hi6553.c
index b724fe4a69e..828be75505f 100644
--- a/drivers/power/pmic/pmic_hi6553.c
+++ b/drivers/power/pmic/pmic_hi6553.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 6c4958208c8..1d03da3cc34 100644
--- a/drivers/power/pmic/pmic_max8997.c
+++ b/drivers/power/pmic/pmic_max8997.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
 #include <power/max8997_pmic.h>
diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c
index c839e318905..cf764fb9bc5 100644
--- a/drivers/power/pmic/pmic_tps65217.c
+++ b/drivers/power/pmic/pmic_tps65217.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/types.h>
 #include <power/tps65217.h>
 
 struct udevice *tps65217_dev __attribute__((section(".data"))) = NULL;
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
index 992838de1b3..baf101a5bab 100644
--- a/drivers/power/pmic/pmic_tps65218.c
+++ b/drivers/power/pmic/pmic_tps65218.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/tps65218.h>
 
diff --git a/drivers/power/pmic/pmic_tps65910.c b/drivers/power/pmic/pmic_tps65910.c
index 4772de11be2..cb484b60a44 100644
--- a/drivers/power/pmic/pmic_tps65910.c
+++ b/drivers/power/pmic/pmic_tps65910.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/types.h>
 #include <power/tps65910.h>
 
 struct udevice *tps65910_dev __attribute__((section(".data"))) = NULL;
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index 422fb72c38e..db25eb662f3 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.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 db0968ac0f5..5f22b5cfba1 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 d9a8298ebbb..a4ac3c496ad 100644
--- a/drivers/power/pmic/rn5t567.c
+++ b/drivers/power/pmic/rn5t567.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <linux/libfdt.h>
+#include <linux/types.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 93c3507e8fa..79740a30a31 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/s2mps11.h>
 
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index f1fa6740660..20f709fe973 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/s5m8767.h>
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index 813294c7f36..68e6dfb73ed 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/sandbox_pmic.h>
diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c
index c7cd596da08..7f3efa49c8e 100644
--- a/drivers/power/pmic/stpmic1.c
+++ b/drivers/power/pmic/stpmic1.c
@@ -14,6 +14,7 @@
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/stpmic1.h>
 
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index 8c8ffbe2046..7a40525956b 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/tps65090.h>
 
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c
index a05023516ba..4a0621ac022 100644
--- a/drivers/power/pmic/tps65941.c
+++ b/drivers/power/pmic/tps65941.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65941.h>
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index e26b60c6abc..c86d6e47172 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <spi.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/pmic.h>
 #include <fsl_pmic.h>
diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c
index 175966293c2..dbdd358a912 100644
--- a/drivers/power/regulator/act8846.c
+++ b/drivers/power/regulator/act8846.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/act8846_pmic.h>
 #include <power/pmic.h>
diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c
index 55b61cd7a9f..419470a457a 100644
--- a/drivers/power/regulator/as3722_regulator.c
+++ b/drivers/power/regulator/as3722_regulator.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <log.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 2a74bfcc79e..68ba0da3bb7 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -8,6 +8,8 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c
index bfe77d6814a..7e6b197be1d 100644
--- a/drivers/power/regulator/da9063.c
+++ b/drivers/power/regulator/da9063.c
@@ -6,10 +6,12 @@
 
 #include <common.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 93aa04f7aee..74c7db93e57 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -10,7 +10,9 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index 2f344e45dfe..e8491a1aa04 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <power/pmic.h>
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index e4c099fb8b4..49520ea1be2 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 5eeed77b29e..5762683d84a 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -13,6 +13,7 @@
 #include <i2c.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <power/pmic.h>
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index 26598b7129f..7235bcc4568 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -8,10 +8,12 @@
 #include <errno.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <regmap.h>
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index 1f9eab05cbe..0d74e7c7181 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 251fc78bc89..3552c9a4c5f 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/uclass-internal.h>
 #include <linux/delay.h>
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
index e6b0bbac7cf..f2b568f083c 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -12,8 +12,10 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 728a67bf8d4..52ed0aa77bc 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -9,6 +9,8 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index 196092c7260..74ac0d7fb96 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -9,9 +9,11 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/sandbox_pmic.h>
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 73cae7c6d8e..944a6ab07c7 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -8,8 +8,11 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 119e8d3ffbb..0b8a2cd12fb 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -7,9 +7,11 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/stpmic1.h>
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index 44c26e868d3..582a2e33ddd 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -10,6 +10,7 @@
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 #define TPS62360_REG_SET0	0
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index cbab544e2bc..cc369db7ec8 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -11,6 +11,7 @@
 #include <time.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 bc9ec2dcb27..46a5d7749cd 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -6,9 +6,11 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65910_pmic.h>
diff --git a/drivers/power/sy8106a.c b/drivers/power/sy8106a.c
index 45f47939869..d4648588a69 100644
--- a/drivers/power/sy8106a.c
+++ b/drivers/power/sy8106a.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <sy8106a.h>
+#include <asm/types.h>
 
 #define SY8106A_I2C_ADDR 0x65
 #define SY8106A_VOUT1_SEL 1
diff --git a/drivers/power/tps6586x.c b/drivers/power/tps6586x.c
index ac9d0986040..db0de93679f 100644
--- a/drivers/power/tps6586x.c
+++ b/drivers/power/tps6586x.c
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static struct udevice *tps6586x_dev;
 
diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index c62db5f24f5..899dd200069 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -25,6 +25,7 @@
 #include <command.h>
 #include <stdio.h>
 #include <twl4030.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 
diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c
index 3f9c2550c3d..fe5f496afbf 100644
--- a/drivers/power/twl6030.c
+++ b/drivers/power/twl6030.c
@@ -5,6 +5,7 @@
  */
 #include <config.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index 59a07e593b9..3e504f342e9 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/pwm.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct exynos_pwm_priv {
 	struct s5p_timer *regs;
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 70bf5851e54..ce91c64156d 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
+#include <linux/types.h>
 #include "pwm-imx-util.h"
 
 int pwm_init(int pwm_id, int div, int invert)
diff --git a/drivers/pwm/pwm-mtk.c b/drivers/pwm/pwm-mtk.c
index 9b997ec88f7..5343903c257 100644
--- a/drivers/pwm/pwm-mtk.c
+++ b/drivers/pwm/pwm-mtk.c
@@ -7,15 +7,18 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <pwm.h>
 #include <div64.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* PWM registers and bits definitions */
 #define PWMCON			0x00
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c
index cf3c723aceb..a57e662729a 100644
--- a/drivers/pwm/pwm-sifive.c
+++ b/drivers/pwm/pwm-sifive.c
@@ -14,16 +14,19 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <pwm.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/bitfield.h>
+#include <linux/types.h>
 
 /* PWMCFG fields */
 #define PWM_SIFIVE_PWMCFG_SCALE         GENMASK(3, 0)
diff --git a/drivers/pwm/pwm-uclass.c b/drivers/pwm/pwm-uclass.c
index e3bfcc837dc..622e7cd4c1e 100644
--- a/drivers/pwm/pwm-uclass.c
+++ b/drivers/pwm/pwm-uclass.c
@@ -9,6 +9,7 @@
 #include <pwm.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
 {
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index afe48071047..8a4e0047d8c 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -18,6 +18,7 @@
 #include <asm/arch-rockchip/pwm.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pwm/sandbox_pwm.c b/drivers/pwm/sandbox_pwm.c
index 44e7f235650..a482fe8174c 100644
--- a/drivers/pwm/sandbox_pwm.c
+++ b/drivers/pwm/sandbox_pwm.c
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <asm/test.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 enum {
 	NUM_CHANNELS	= 3,
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index 55472103fcc..564b24c0564 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -16,6 +16,7 @@
 #include <asm/arch/pwm.h>
 #include <asm/arch/gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index 11378bb2e3b..d52cf634ba9 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/pwm.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct tegra_pwm_priv {
 	struct pwm_ctlr *regs;
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 7c14fe35e58..7a71a5298db 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <command.h>
 #include <stdio.h>
@@ -18,6 +19,7 @@
 #include <fsl_qe.h>
 #include <mmc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #ifdef CONFIG_ARCH_LS1021A
diff --git a/drivers/qe/uccf.c b/drivers/qe/uccf.c
index b4f0a0979c2..5497aae7606 100644
--- a/drivers/qe/uccf.c
+++ b/drivers/qe/uccf.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <linux/immap_qe.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "uccf.h"
 #include <fsl_qe.h>
 
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index cb11e99faf8..0a44c92f26d 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -18,6 +18,7 @@
 #include <linux/immap_qe.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "uccf.h"
 #include "uec.h"
 #include "uec_phy.h"
diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c
index ff9ed5d01ae..49a3f1bfd59 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <malloc.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/immap_qe.h>
diff --git a/drivers/qe/uec_phy.h b/drivers/qe/uec_phy.h
index 83a7ccd9819..9ede1faeecc 100644
--- a/drivers/qe/uec_phy.h
+++ b/drivers/qe/uec_phy.h
@@ -11,6 +11,7 @@
 #ifndef __UEC_PHY_H__
 #define __UEC_PHY_H__
 
+#include <asm/types.h>
 #define MII_end ((u32)-2)
 #define MII_read ((u32)-1)
 
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
index 0746d677a4c..c1775d60797 100644
--- a/drivers/ram/bmips_ram.c
+++ b/drivers/ram/bmips_ram.c
@@ -8,12 +8,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define SDRAM_CFG_REG		0x0
 #define SDRAM_CFG_COL_SHIFT	4
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index bfdf666cc43..c0b57178c07 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -12,6 +12,7 @@
 #include <ram.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index d4cc6d772e7..d2f9f12e6c4 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <ram.h>
@@ -16,6 +17,7 @@
 #include <power-domain.h>
 #include <dm.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <power/regulator.h>
diff --git a/drivers/ram/k3-am654-ddrss.h b/drivers/ram/k3-am654-ddrss.h
index c87f186291e..9f2ee87b5af 100644
--- a/drivers/ram/k3-am654-ddrss.h
+++ b/drivers/ram/k3-am654-ddrss.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <asm/types.h>
  * AM654: DDRSS Register definitions and structures.
  *
  * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
diff --git a/drivers/ram/k3-j721e/cps_drv_lpddr4.h b/drivers/ram/k3-j721e/cps_drv_lpddr4.h
index 706a5cde01a..9da9d712064 100644
--- a/drivers/ram/k3-j721e/cps_drv_lpddr4.h
+++ b/drivers/ram/k3-j721e/cps_drv_lpddr4.h
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <inttypes.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /**
  *  \brief    Read a 32-bit value from memory.
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index bccf5a65c92..637abc4c6d4 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <wait_bit.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "lpddr4_obj_if.h"
 #include "lpddr4_if.h"
diff --git a/drivers/ram/k3-j721e/lpddr4_private.h b/drivers/ram/k3-j721e/lpddr4_private.h
index 42c923464aa..e3aa360b6cc 100644
--- a/drivers/ram/k3-j721e/lpddr4_private.h
+++ b/drivers/ram/k3-j721e/lpddr4_private.h
@@ -10,6 +10,7 @@
 #ifndef LPDDR4_PRIV_H
 #define LPDDR4_PRIV_H
 
+#include <linux/types.h>
 #define PRODUCT_ID (0x1046U)
 #define VERSION_0  (0x54d5da40U)
 #define VERSION_1  (0xc1865a1U)
diff --git a/drivers/ram/mediatek/ddr3-mt7629.c b/drivers/ram/mediatek/ddr3-mt7629.c
index a2f72b70470..f25334a0421 100644
--- a/drivers/ram/mediatek/ddr3-mt7629.c
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index 844a8a0d9fb..9eabe4b425d 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <dt-bindings/memory/mpc83xx-sdram.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 9f13363e634..c2030101aa9 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <dt-bindings/memory/rk3368-dmc.h>
@@ -28,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct dram_info {
 	struct ram_info info;
diff --git a/drivers/ram/rockchip/sdram_common.c b/drivers/ram/rockchip/sdram_common.c
index 5dd68c97682..04f5e52223d 100644
--- a/drivers/ram/rockchip/sdram_common.c
+++ b/drivers/ram/rockchip/sdram_common.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <ram.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_common.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_RAM_ROCKCHIP_DEBUG
 void sdram_print_dram_type(unsigned char dramtype)
diff --git a/drivers/ram/rockchip/sdram_pctl_px30.c b/drivers/ram/rockchip/sdram_pctl_px30.c
index 331d85fba26..5256ff0a6cc 100644
--- a/drivers/ram/rockchip/sdram_pctl_px30.c
+++ b/drivers/ram/rockchip/sdram_pctl_px30.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_pctl_px30.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /*
diff --git a/drivers/ram/rockchip/sdram_phy_px30.c b/drivers/ram/rockchip/sdram_phy_px30.c
index f7f6de1ba98..c81a8b8bab4 100644
--- a/drivers/ram/rockchip/sdram_phy_px30.c
+++ b/drivers/ram/rockchip/sdram_phy_px30.c
@@ -4,11 +4,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_common.h>
 #include <asm/arch-rockchip/sdram_phy_px30.h>
+#include <asm/types.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 a4f8980bfd7..65587df88ba 100644
--- a/drivers/ram/rockchip/sdram_px30.c
+++ b/drivers/ram/rockchip/sdram_px30.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <dm.h>
 #include <init.h>
@@ -17,6 +18,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_px30.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/ram/rockchip/sdram_rk3128.c b/drivers/ram/rockchip/sdram_rk3128.c
index 0162955aae0..265d1284794 100644
--- a/drivers/ram/rockchip/sdram_rk3128.c
+++ b/drivers/ram/rockchip/sdram_rk3128.c
@@ -11,6 +11,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/grf_rk3128.h>
 #include <asm/arch-rockchip/sdram.h>
+#include <asm/types.h>
 
 struct dram_info {
 	struct ram_info info;
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index cfa6d0ebf19..3523e69ad3c 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <asm/io.h>
@@ -31,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct chan_info {
 	struct rk3288_ddr_pctl *pctl;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 80abe9c9b20..5d931dcf756 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <asm/io.h>
@@ -31,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <power/rk8xx_pmic.h>
 
diff --git a/drivers/ram/rockchip/sdram_rk3308.c b/drivers/ram/rockchip/sdram_rk3308.c
index 310df79123c..4b37aa1a184 100644
--- a/drivers/ram/rockchip/sdram_rk3308.c
+++ b/drivers/ram/rockchip/sdram_rk3308.c
@@ -10,6 +10,7 @@
 #include <asm/arch/grf_rk3308.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/sdram.h>
+#include <asm/types.h>
 
 struct dram_info {
 	struct ram_info info;
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 827d52e7a5c..404abeba3f4 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <dm.h>
 #include <dt-structs.h>
@@ -20,6 +21,7 @@
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3328.h>
 #include <asm/arch-rockchip/uart.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 690b8c3f3b2..0a4b3a10504 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -7,12 +7,14 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dt-structs.h>
 #include <init.h>
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <asm/io.h>
@@ -23,6 +25,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3399.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <time.h>
diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/fu540_ddr.c
index 0270dd088db..ec05dc7f93f 100644
--- a/drivers/ram/sifive/fu540_ddr.c
+++ b/drivers/ram/sifive/fu540_ddr.c
@@ -20,6 +20,7 @@
 #include <wait_bit.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define DENALI_CTL_0	0
 #define DENALI_CTL_21	21
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 04fb730525d..31e410ae8a3 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -12,6 +12,7 @@
 #include <ram.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index d122dadd6dc..329284c6d93 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -5,14 +5,17 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <log.h>
 #include <ram.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <timer.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.h b/drivers/ram/stm32mp1/stm32mp1_ddr.h
index 5f15196b2da..73531124946 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.h
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.h
@@ -7,6 +7,7 @@
 #define _RAM_STM32MP1_DDR_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 enum stm32mp1_ddr_interact_step {
 	STEP_DDR_RESET,
 	STEP_CTL_INIT,
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h b/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
index 3c8885a9657..6deae23815a 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 <asm/types.h>
 #include <linux/bitops.h>
 struct stm32mp1_ddrctl {
 	u32 mstr ;		/* 0x0 Master*/
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index d45071d3ed3..e49257b3955 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -12,10 +12,12 @@
 #include <malloc.h>
 #include <ram.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include "stm32mp1_ddr.h"
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 8b49730e633..35d6b0fef2a 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -5,11 +5,13 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <init.h>
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <asm/io.h>
@@ -17,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "stm32mp1_ddr.h"
 
 static const char *const clkname[] = {
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 00bdbe6762a..e960bc833c4 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -7,6 +7,7 @@
 #include <init.h>
 #include <log.h>
 #include <rand.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <watchdog.h>
@@ -15,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "stm32mp1_tests.h"
 
 #define ADDR_INVALID	0xFFFFFFFF
diff --git a/drivers/ram/stm32mp1/stm32mp1_tuning.c b/drivers/ram/stm32mp1/stm32mp1_tuning.c
index 8da11d0629a..0ff63bca66a 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -9,9 +9,11 @@
 #include <ram.h>
 #include <rand.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index aa993b97392..779665ec1ac 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <remoteproc.h>
@@ -16,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/soc/ti/k3-sec-proxy.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define K3_MSG_R5_TO_M3_M3FW			0x8105
 #define K3_MSG_M3_TO_R5_CERT_RESULT		0x8805
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index bb82de08da7..00a83d61c6f 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <elf.h>
@@ -15,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct resource_table - firmware resource table header
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index e7513240ec5..a55c502d43c 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c
index e3759eed95c..ce7cfe67523 100644
--- a/drivers/remoteproc/sandbox_testproc.c
+++ b/drivers/remoteproc/sandbox_testproc.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /**
  * enum sandbox_state - different device states
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c
index eb437464ae1..6ff3d3d9383 100644
--- a/drivers/remoteproc/stm32_copro.c
+++ b/drivers/remoteproc/stm32_copro.c
@@ -11,12 +11,14 @@
 #include <regmap.h>
 #include <remoteproc.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define RCC_GCR_HOLD_BOOT	0
 #define RCC_GCR_RELEASE_BOOT	1
diff --git a/drivers/remoteproc/ti_k3_arm64_rproc.c b/drivers/remoteproc/ti_k3_arm64_rproc.c
index 20b02f691e3..4fec3d83418 100644
--- a/drivers/remoteproc/ti_k3_arm64_rproc.c
+++ b/drivers/remoteproc/ti_k3_arm64_rproc.c
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
+#include <linux/types.h>
 #include "ti_sci_proc.h"
 
 #define INVALID_ID	0xffff
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c
index a341ef84e8a..37a311f3607 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -15,6 +16,7 @@
 #include <errno.h>
 #include <clk.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <power-domain.h>
 #include <dm/device_compat.h>
@@ -24,6 +26,7 @@
 #include <linux/sizes.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ti_sci_proc.h"
 
 #define KEYSTONE_RPROC_LOCAL_ADDRESS_MASK	(SZ_16M - 1)
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index db437c1a686..565036de619 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -14,6 +15,7 @@
 #include <errno.h>
 #include <clk.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
@@ -22,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ti_sci_proc.h"
 
 /*
diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c
index 84e621ca9ee..a48acc99819 100644
--- a/drivers/remoteproc/ti_power_proc.c
+++ b/drivers/remoteproc/ti_power_proc.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <mach/psc_defs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/remoteproc/ti_sci_proc.h b/drivers/remoteproc/ti_sci_proc.h
index 36351da63fc..88a316f692c 100644
--- a/drivers/remoteproc/ti_sci_proc.h
+++ b/drivers/remoteproc/ti_sci_proc.h
@@ -10,6 +10,7 @@
 #ifndef REMOTEPROC_TI_SCI_PROC_H
 #define REMOTEPROC_TI_SCI_PROC_H
 
+#include <asm/types.h>
 #include <linux/printk.h>
 #define TISCI_INVALID_HOST 0xff
 
diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c
index d1e687bc135..f98eee5a787 100644
--- a/drivers/reset/ast2500-reset.c
+++ b/drivers/reset/ast2500-reset.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <asm/arch/wdt.h>
+#include <asm/types.h>
 
 struct ast2500_reset_priv {
 	/* WDT used to perform resets. */
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 69793967c42..f11843ec5d5 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index 2012421e417..a03365be44f 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -3,11 +3,13 @@
  * Copyright (c) 2019, Linaro Limited
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dt-bindings/reset/ti-syscon.h>
 #include <reset-uclass.h>
 #include <linux/bitops.h>
diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index c9cfa6bc7d3..b730f5ccae9 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -6,10 +6,12 @@
  * Author: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/iopoll.h>
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index 1ad031b9041..92369363042 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -3,11 +3,13 @@
  * Copyright (c) 2017, Impinj, Inc.
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dt-bindings/reset/imx7-reset.h>
 #include <dt-bindings/reset/imx8mq-reset.h>
 #include <reset-uclass.h>
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 9df4c2a1c7b..4ef148824af 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <regmap.h>
 #include <reset-uclass.h>
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index ee53df94eca..b08b2dd0a26 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -15,6 +15,7 @@
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 4d59a9b8ac5..4e6d5d39736 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 5e8daa28913..e3b504e7c94 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -4,10 +4,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 370353e6cba..8f6658e17a5 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -13,12 +13,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <dm/of_access.h>
 #include <env.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 54692cc3f5e..ca557c63a9e 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <dm/lists.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/log2.h>
 #include <asm/arch/ccu.h>
+#include <linux/types.h>
 
 struct sunxi_reset_priv {
 	void *base;
diff --git a/drivers/reset/reset-syscon.c b/drivers/reset/reset-syscon.c
index 16e74dc8e94..c907acbeee9 100644
--- a/drivers/reset/reset-syscon.c
+++ b/drivers/reset/reset-syscon.c
@@ -8,10 +8,12 @@
 #include <regmap.h>
 #include <reset.h>
 #include <reset-uclass.h>
+#include <stdbool.h>
 #include <syscon.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct syscon_reset_priv {
 	struct regmap *regmap;
diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c
index 4d00622eb81..b234c3c2808 100644
--- a/drivers/reset/reset-ti-sci.c
+++ b/drivers/reset/reset-ti-sci.c
@@ -14,6 +14,8 @@
 #include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index b557906b890..941b2dadd4e 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -14,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 struct uniphier_reset_data {
 	unsigned int id;
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index d80e985711e..46b8cddd4fd 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <wait_bit.h>
 #include <dm.h>
 #include <reset-uclass.h>
@@ -19,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/rng/meson-rng.c b/drivers/rng/meson-rng.c
index 0debe8a1068..81d10381687 100644
--- a/drivers/rng/meson-rng.c
+++ b/drivers/rng/meson-rng.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct meson_rng_platdata {
 	fdt_addr_t base;
diff --git a/drivers/rng/rng-uclass.c b/drivers/rng/rng-uclass.c
index b315401f20e..9c547686f47 100644
--- a/drivers/rng/rng-uclass.c
+++ b/drivers/rng/rng-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <rng.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int dm_rng_read(struct udevice *dev, void *buffer, size_t size)
 {
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index 35f999c447d..b7454bd5be9 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <rng.h>
+#include <linux/types.h>
 
 #define RK_HW_RNG_MAX 32
 
diff --git a/drivers/rng/sandbox_rng.c b/drivers/rng/sandbox_rng.c
index a55e552177a..27ad9e8aba8 100644
--- a/drivers/rng/sandbox_rng.c
+++ b/drivers/rng/sandbox_rng.c
@@ -8,6 +8,7 @@
 #include <rand.h>
 #include <rng.h>
 #include <time.h>
+#include <linux/types.h>
 
 #include <linux/string.h>
 
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index 25cba160222..d4d6b3e48ee 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -14,6 +14,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/rtc/at91sam9_rtt.c b/drivers/rtc/at91sam9_rtt.c
index 6f92660ef1d..12d57073f6a 100644
--- a/drivers/rtc/at91sam9_rtt.c
+++ b/drivers/rtc/at91sam9_rtt.c
@@ -26,6 +26,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_rtt.h>
 #include <asm/arch/at91_gpbr.h>
+#include <linux/types.h>
 
 int rtc_get (struct rtc_time *tmp)
 {
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index 36d615812b2..0f1dbf636fb 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -19,6 +19,7 @@
 #include <rtc.h>
 #include <spi.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #define	RTC_SECONDS		0x00
 #define	RTC_MINUTES		0x01
diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c
index acdae077c40..84c1f0731c9 100644
--- a/drivers/rtc/ds1307.c
+++ b/drivers/rtc/ds1307.c
@@ -20,6 +20,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 enum ds_type {
 	ds_1307,
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index 9b9a9d6a810..fc0767a034b 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -18,6 +18,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*
  * RTC register addresses
diff --git a/drivers/rtc/ds1374.c b/drivers/rtc/ds1374.c
index dc8e370a402..2d217d33371 100644
--- a/drivers/rtc/ds1374.c
+++ b/drivers/rtc/ds1374.c
@@ -19,6 +19,7 @@
 #include <i2c.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*---------------------------------------------------------------------*/
 #undef DEBUG_RTC
diff --git a/drivers/rtc/ds1556.c b/drivers/rtc/ds1556.c
index 27bf4281698..3834affba6a 100644
--- a/drivers/rtc/ds1556.c
+++ b/drivers/rtc/ds1556.c
@@ -19,6 +19,7 @@
 #include <command.h>
 #include <rtc.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_CMD_DATE)
 
diff --git a/drivers/rtc/ds164x.c b/drivers/rtc/ds164x.c
index b363908e79a..172a1ff2777 100644
--- a/drivers/rtc/ds164x.c
+++ b/drivers/rtc/ds164x.c
@@ -19,6 +19,7 @@
 #include <command.h>
 #include <rtc.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 
 static uchar    rtc_read(unsigned int addr );
diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
index 827c06b2b47..acfc4a6914f 100644
--- a/drivers/rtc/ds174x.c
+++ b/drivers/rtc/ds174x.c
@@ -17,6 +17,7 @@
 #include <rtc.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 static uchar rtc_read( unsigned int addr );
 static void  rtc_write( unsigned int addr, uchar val);
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index ebb1cc65c64..051ff55b69b 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /*
  * RTC register addresses
diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c
index e6c9f878665..73b77f8d970 100644
--- a/drivers/rtc/ds3232.c
+++ b/drivers/rtc/ds3232.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <rtc.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index 93b9ecc18db..fb814078417 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -23,6 +23,7 @@
 #include <asm/rtc.h>
 #include <asm/test.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef DEBUG
 #define debug_buffer print_buffer
diff --git a/drivers/rtc/imxdi.c b/drivers/rtc/imxdi.c
index 55def3ac9fd..19c77ba097b 100644
--- a/drivers/rtc/imxdi.c
+++ b/drivers/rtc/imxdi.c
@@ -14,7 +14,9 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/compat.h>
 #include <rtc.h>
 #include <linux/delay.h>
diff --git a/drivers/rtc/isl1208.c b/drivers/rtc/isl1208.c
index 47c48bfc11f..87010526148 100644
--- a/drivers/rtc/isl1208.c
+++ b/drivers/rtc/isl1208.c
@@ -17,6 +17,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*---------------------------------------------------------------------*/
 #ifdef DEBUG_RTC
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index 469551980a9..8f618fb173a 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -17,6 +17,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*
 	I Don't have an example config file but this
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index 05ed89bf8d6..0cfd3d61b2d 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -23,6 +23,7 @@
 #include <i2c.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 /*
  * Convert between century and "century bits" (CB1 and CB0).  These routines
diff --git a/drivers/rtc/m41t62.c b/drivers/rtc/m41t62.c
index 23ebaddf941..a3478e28bda 100644
--- a/drivers/rtc/m41t62.c
+++ b/drivers/rtc/m41t62.c
@@ -23,6 +23,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 #define M41T62_REG_SSEC	0
 #define M41T62_REG_SEC	1
diff --git a/drivers/rtc/m41t94.c b/drivers/rtc/m41t94.c
index 5b665bb0133..e997fccb3a7 100644
--- a/drivers/rtc/m41t94.c
+++ b/drivers/rtc/m41t94.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <rtc.h>
 #include <spi.h>
+#include <asm/types.h>
 
 static struct spi_slave *slave;
 
diff --git a/drivers/rtc/m48t35ax.c b/drivers/rtc/m48t35ax.c
index 1cc24cccae7..1f1dddd9bf7 100644
--- a/drivers/rtc/m48t35ax.c
+++ b/drivers/rtc/m48t35ax.c
@@ -15,6 +15,7 @@
 #include <command.h>
 #include <rtc.h>
 #include <config.h>
+#include <linux/types.h>
 
 static uchar rtc_read  (uchar reg);
 static void  rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c
index 11928839dcf..7e7abae8977 100644
--- a/drivers/rtc/max6900.c
+++ b/drivers/rtc/max6900.c
@@ -15,6 +15,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #ifndef	CONFIG_SYS_I2C_RTC_ADDR
 #define	CONFIG_SYS_I2C_RTC_ADDR	0x50
diff --git a/drivers/rtc/mc13xxx-rtc.c b/drivers/rtc/mc13xxx-rtc.c
index 6c2aef89758..4784e9dda18 100644
--- a/drivers/rtc/mc13xxx-rtc.c
+++ b/drivers/rtc/mc13xxx-rtc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <rtc.h>
 #include <spi.h>
+#include <asm/types.h>
 #include <power/pmic.h>
 #include <fsl_pmic.h>
 
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index 7c25afb1819..830eec0f821 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -14,6 +14,7 @@
 #include <rtc.h>
 #include <stdio.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_X86) || defined(CONFIG_MALTA)
 #include <asm/io.h>
diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c
index 0fa155c14d0..2947da9f448 100644
--- a/drivers/rtc/mk48t59.c
+++ b/drivers/rtc/mk48t59.c
@@ -16,6 +16,7 @@
 #include <rtc.h>
 #include <mk48t59.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_BAB7xx)
 
diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c
index 6a0224cad73..80a4feb9308 100644
--- a/drivers/rtc/mvrtc.c
+++ b/drivers/rtc/mvrtc.c
@@ -14,6 +14,7 @@
 #include <rtc.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include "mvrtc.h"
 
diff --git a/drivers/rtc/mvrtc.h b/drivers/rtc/mvrtc.h
index 87ff43299ca..9244ad82189 100644
--- a/drivers/rtc/mvrtc.h
+++ b/drivers/rtc/mvrtc.h
@@ -12,6 +12,7 @@
 #define _MVRTC_H_
 
 #include <asm/arch/soc.h>
+#include <asm/types.h>
 #include <linux/compiler.h>
 
 /* RTC registers */
diff --git a/drivers/rtc/mx27rtc.c b/drivers/rtc/mx27rtc.c
index 563e8a4a361..742f33e5837 100644
--- a/drivers/rtc/mx27rtc.c
+++ b/drivers/rtc/mx27rtc.c
@@ -9,6 +9,7 @@
 #include <rtc.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 #define HOUR_SHIFT 8
 #define HOUR_MASK  0x1f
diff --git a/drivers/rtc/mxsrtc.c b/drivers/rtc/mxsrtc.c
index ec0c631cc49..22e438d47aa 100644
--- a/drivers/rtc/mxsrtc.c
+++ b/drivers/rtc/mxsrtc.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 #define	MXS_RTC_MAX_TIMEOUT	1000000
 
diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c
index e4ab395f514..4a357cf7671 100644
--- a/drivers/rtc/pcf2127.c
+++ b/drivers/rtc/pcf2127.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #define PCF2127_REG_CTRL1	0x00
 #define PCF2127_REG_CTRL2	0x01
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index 79d1b71a0cf..3a910e766ef 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -17,6 +17,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #if !CONFIG_IS_ENABLED(DM_RTC)
 static uchar rtc_read  (uchar reg);
diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c
index 4718229657e..6d99007558c 100644
--- a/drivers/rtc/pt7c4338.c
+++ b/drivers/rtc/pt7c4338.c
@@ -25,6 +25,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 
 /* RTC register addresses */
 #define RTC_SEC_REG_ADDR        0x0
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index 1fda0cd8fbc..b4f70519fa2 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <log.h>
 #include <rtc.h>
+#include <asm/types.h>
 #include <linux/errno.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 bda19d6853f..c241aa085be 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define RTC_RV3029_PAGE_LEN             7
 
diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c
index 5e16676c04c..f04a5ba0897 100644
--- a/drivers/rtc/rv8803.c
+++ b/drivers/rtc/rv8803.c
@@ -17,6 +17,7 @@
 #include <rtc.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 /*
diff --git a/drivers/rtc/rx8010sj.c b/drivers/rtc/rx8010sj.c
index 1da7a7d6c90..c2bbce35088 100644
--- a/drivers/rtc/rx8010sj.c
+++ b/drivers/rtc/rx8010sj.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <rtc.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c
index aaa3609be00..b92ebd263de 100644
--- a/drivers/rtc/rx8025.c
+++ b/drivers/rtc/rx8025.c
@@ -15,6 +15,7 @@
 #include <rtc.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /*---------------------------------------------------------------------*/
 #undef DEBUG_RTC
diff --git a/drivers/rtc/s35392a.c b/drivers/rtc/s35392a.c
index 3744d8445fb..cfa745529e0 100644
--- a/drivers/rtc/s35392a.c
+++ b/drivers/rtc/s35392a.c
@@ -22,6 +22,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitrev.h>
 #include <rtc.h>
 #include <linux/delay.h>
diff --git a/drivers/rtc/s3c24x0_rtc.c b/drivers/rtc/s3c24x0_rtc.c
index 807347a9149..e76193c45d4 100644
--- a/drivers/rtc/s3c24x0_rtc.c
+++ b/drivers/rtc/s3c24x0_rtc.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <command.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 #include <asm/arch/s3c24x0_cpu.h>
 
diff --git a/drivers/rtc/sandbox_rtc.c b/drivers/rtc/sandbox_rtc.c
index 852770a49cf..a16133f9daf 100644
--- a/drivers/rtc/sandbox_rtc.c
+++ b/drivers/rtc/sandbox_rtc.c
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <rtc.h>
 #include <asm/rtc.h>
+#include <asm/types.h>
 #include <dm/acpi.h>
 
 #define REG_COUNT 0x80
diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c
index 8f9540697df..9cf16289f4f 100644
--- a/drivers/rtc/stm32_rtc.c
+++ b/drivers/rtc/stm32_rtc.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <rtc.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c
index ce23427b174..e913210057f 100644
--- a/drivers/rtc/x1205.c
+++ b/drivers/rtc/x1205.c
@@ -22,6 +22,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <i2c.h>
+#include <asm/types.h>
 
 #define CCR_SEC			0
 #define CCR_MIN			1
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 0a68ef4a187..5b9f1ccbdbb 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -13,6 +13,7 @@
 #include <part.h>
 #include <pci.h>
 #include <scsi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <dm/device-internal.h>
@@ -20,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_DM_SCSI)
 # ifdef CONFIG_SCSI_DEV_LIST
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index bd2b65b028f..5cfef019a38 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -10,6 +10,7 @@
 #include <serial.h>
 #include <stdbool.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 3d309885c2c..9492a3c952c 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -10,6 +10,7 @@
 #include <serial.h>
 #include <stdbool.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 84bf36f3be5..0add4e41dbd 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -2,6 +2,8 @@
 /*
  * Copyright (C) 2004-2006 Atmel Corporation
  *
+#include <compiler.h>
+#include <linux/types.h>
  * Modified to support C structur SoC access by
  * Andreas Bießmann <biessmann at corscience.de>
  */
diff --git a/drivers/serial/atmel_usart.h b/drivers/serial/atmel_usart.h
index 8f27488158d..61c057b13ec 100644
--- a/drivers/serial/atmel_usart.h
+++ b/drivers/serial/atmel_usart.h
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2005-2006 Atmel Corporation
  *
+#include <asm/types.h>
  * Modified to support C structure SoC access by
  * Andreas Bießmann <biessmann at corscience.de>
  */
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 49ca3ff1320..a23f0ffaf4a 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <serial.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/platform_data/lpc32xx_hsuart.h>
 #include <linux/errno.h>
 
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index b0b69cf96f7..3e704de6c72 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -13,6 +13,7 @@
 #include <ns16550.h>
 #include <reset.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
 #include <linux/err.h>
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index c811524e357..b23283e66b3 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -16,6 +16,7 @@
 #include <lcd.h>
 #include <os.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <video.h>
 #include <asm/global_data.h>
 #include <linux/compiler.h>
@@ -23,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 5176a7395b7..2d8b5715cfb 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index c3235135b5b..69180263985 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env_internal.h>
 #include <hang.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index fdcd62705ad..3d4b539d72c 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -5,10 +5,12 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <dm.h>
 #include <div64.h>
 #include <errno.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index 4205ffdd0df..69435a16e37 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -12,6 +12,7 @@
 #include <serial.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 6e54e4ca72f..0be968c24e8 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -22,6 +22,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <serial.h>
+#include <asm/types.h>
 #include <dm/platform_data/serial_bcm283x_mu.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c
index a90bfc7f5ed..eb64b6acfbf 100644
--- a/drivers/serial/serial_bcm6345.c
+++ b/drivers/serial/serial_bcm6345.c
@@ -7,6 +7,7 @@
  */
 
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <debug_uart.h>
 #include <errno.h>
@@ -16,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/types.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* UART Control register */
 #define UART_CTL_REG			0x0
diff --git a/drivers/serial/serial_cortina.c b/drivers/serial/serial_cortina.c
index 001fca79f98..aea9f8fd771 100644
--- a/drivers/serial/serial_cortina.c
+++ b/drivers/serial/serial_cortina.c
@@ -6,12 +6,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <serial.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/errno.h>
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index 4739c5a20e8..e8d62ba2226 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <serial.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Information about the efi console */
 struct serial_efi_priv {
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index b9b947a930a..408f0a7944d 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -15,6 +15,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define US1_TDRE            (1 << 7)
 #define US1_RDRF            (1 << 5)
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 45ae154b633..239e614c3e0 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fsl_lpuart.h>
 #include <log.h>
@@ -20,6 +21,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define US1_TDRE	(1 << 7)
 #define US1_RDRF	(1 << 5)
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index f1670a0eddd..f6a8aa84224 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -25,6 +25,7 @@
 #include <asm/immap.h>
 #include <asm/uart.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 63875c626cd..a245d168e41 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -12,6 +12,7 @@
 #include <linux/compiler.h>
 #include <serial.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct meson_uart {
 	u32 wfifo;
diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c
index ba87240d74c..9628539cccc 100644
--- a/drivers/serial/serial_mpc8xx.c
+++ b/drivers/serial/serial_mpc8xx.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <dm.h>
 #include <serial.h>
 #include <stdbool.h>
@@ -13,6 +14,7 @@
 #include <asm/cpm_8xx.h>
 #include <asm/global_data.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index a86563e8d8f..c1486988b6a 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -21,6 +21,7 @@
 #include <linux/compiler.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Serial registers - this driver works in uartdm mode*/
 
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index c028d760f2f..ddd45fb2da1 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -8,11 +8,13 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <div64.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c
index a5674e6b13b..ddb4d71324c 100644
--- a/drivers/serial/serial_mvebu_a3700.c
+++ b/drivers/serial/serial_mvebu_a3700.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <serial.h>
 #include <stdbool.h>
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index d13dbeb3cef..b6646d1374e 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -15,6 +16,7 @@
 #include <serial.h>
 #include <linux/compiler.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* UART Control Register Bit Fields.*/
 #define URXD_CHARRDY	(1<<15)
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 1353e2f7ccb..82b3919f13d 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <ns16550.h>
 #include <serial.h>
 #include <asm/global_data.h>
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index b661b11f0d8..8d0c372b038 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -15,6 +15,7 @@
 #include <clk.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_SYS_NS16550_CLK
 #define CONFIG_SYS_NS16550_CLK  0
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index f1473d6cffa..a7a54398fb2 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -5,14 +5,17 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <malloc.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <wait_bit.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
 
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 1f4e54628fa..6f06b127ed9 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -11,6 +11,7 @@
 /* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
diff --git a/drivers/serial/serial_pl01x_internal.h b/drivers/serial/serial_pl01x_internal.h
index a2d696e6c27..9bfa403c403 100644
--- a/drivers/serial/serial_pl01x_internal.h
+++ b/drivers/serial/serial_pl01x_internal.h
@@ -15,6 +15,7 @@
 
 #ifndef __ASSEMBLY__
 /*
+#include <asm/types.h>
  * We can use a combined structure for PL010 and PL011, because they overlap
  * only in common registers.
  */
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index 459ce781712..3723b2a2eb9 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <hang.h>
 #include <stdbool.h>
 #include <vsprintf.h>
@@ -33,6 +34,7 @@
 #include <serial.h>
 #include <watchdog.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 0e800633452..2eaafab5bb0 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -20,6 +20,7 @@
 #include <serial.h>
 #include <clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index e87f1d0ecfe..3222028de46 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 39b62d30eb4..d127f6004bf 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -10,9 +10,11 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <stdbool.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/compiler.h>
 #include <serial.h>
 #include <linux/err.h>
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index d3d1b74478a..1b72bd59a82 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index c5d8d3f3dde..a22f48c0b67 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <reset.h>
 #include <serial.h>
+#include <stdbool.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
@@ -17,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0c541ead06e..ad2a8a19dca 100644
--- a/drivers/serial/serial_stm32.h
+++ b/drivers/serial/serial_stm32.h
@@ -8,6 +8,7 @@
 #define _SERIAL_STM32_
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #define CR1_OFFSET(x)	(x ? 0x0c : 0x00)
 #define CR3_OFFSET(x)	(x ? 0x14 : 0x08)
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index 95d378ec28f..79882122beb 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -6,7 +6,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 7fec7d5bec4..b96f8114377 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -11,8 +11,10 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <stdbool.h>
 #include <watchdog.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index 4e2e09edd3f..27298566423 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -16,6 +16,7 @@
 #include <asm/unaligned.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usbtty.h"
 #include "usb_cdc_acm.h"
 #include "usbdescriptors.h"
diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 3a5ee3bbce0..69b008da279 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <errno.h>
 #include <dm.h>
 #include <asm/global_data.h>
@@ -22,6 +23,7 @@
 #include <smem.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/smem/sandbox_smem.c b/drivers/smem/sandbox_smem.c
index 7397e4407ad..8c31232e9c1 100644
--- a/drivers/smem/sandbox_smem.c
+++ b/drivers/smem/sandbox_smem.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <smem.h>
 #include <asm/test.h>
+#include <linux/types.h>
 
 static int sandbox_smem_alloc(unsigned int host,
 		unsigned int item, size_t size)
diff --git a/drivers/smem/smem-uclass.c b/drivers/smem/smem-uclass.c
index 90b1316d6dc..7a5b18921d0 100644
--- a/drivers/smem/smem-uclass.c
+++ b/drivers/smem/smem-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <smem.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int smem_alloc(struct udevice *dev, unsigned int host,
 		unsigned int item, size_t size)
diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c
index 5ffccba2e8c..ec9f598f28b 100644
--- a/drivers/soc/soc_ti_k3.c
+++ b/drivers/soc/soc_ti_k3.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <soc.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #include <asm/io.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index c9a8b1ed019..81f029fa636 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -6,8 +6,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <malloc.h>
@@ -27,6 +29,7 @@
 #include <linux/soc/ti/k3-navss-ringacc.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define set_bit(bit, bitmap)	__set_bit(bit, bitmap)
 #define clear_bit(bit, bitmap)	__clear_bit(bit, bitmap)
diff --git a/drivers/soc/ti/keystone_serdes.c b/drivers/soc/ti/keystone_serdes.c
index 68fa28a6f80..b45aa571ffa 100644
--- a/drivers/soc/ti/keystone_serdes.c
+++ b/drivers/soc/ti/keystone_serdes.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <stdio.h>
 #include <asm/ti-common/keystone_serdes.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
index 4258d607cb4..1e78b5686c4 100644
--- a/drivers/sound/broadwell_i2s.c
+++ b/drivers/sound/broadwell_i2s.c
@@ -16,6 +16,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "broadwell_i2s.h"
 
 enum {
diff --git a/drivers/sound/broadwell_i2s.h b/drivers/sound/broadwell_i2s.h
index ba87abfc6ae..683539b918e 100644
--- a/drivers/sound/broadwell_i2s.h
+++ b/drivers/sound/broadwell_i2s.h
@@ -10,6 +10,7 @@
 #ifndef __BROADWELL_I2S_H__
 #define __BROADWELL_I2S_H__
 
+#include <asm/types.h>
 enum {
 	SSP_FIFO_SIZE = 7,
 };
diff --git a/drivers/sound/broadwell_sound.c b/drivers/sound/broadwell_sound.c
index ba2a68ce56a..8f770a0e8e4 100644
--- a/drivers/sound/broadwell_sound.c
+++ b/drivers/sound/broadwell_sound.c
@@ -14,6 +14,7 @@
 #include <i2s.h>
 #include <sound.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int broadwell_sound_probe(struct udevice *dev)
 {
diff --git a/drivers/sound/codec-uclass.c b/drivers/sound/codec-uclass.c
index 207dc188c48..2f938c766e0 100644
--- a/drivers/sound/codec-uclass.c
+++ b/drivers/sound/codec-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <audio_codec.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int audio_codec_set_params(struct udevice *dev, int interface, int rate,
 			   int mclk_freq, int bits_per_sample, uint channels)
diff --git a/drivers/sound/da7219.c b/drivers/sound/da7219.c
index e9d56b1f869..d98fdf5717d 100644
--- a/drivers/sound/da7219.c
+++ b/drivers/sound/da7219.c
@@ -18,6 +18,7 @@
 #include <asm/acpi_nhlt.h>
 #endif
 #include <asm-generic/gpio.h>
+#include <asm/types.h>
 #include <dt-bindings/sound/nhlt.h>
 #include <dm/acpi.h>
 #include <linux/errno.h>
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index 241b6270c4d..fcf76d2284a 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /**
  * struct hda_regs - HDA registers
diff --git a/drivers/sound/i2s-uclass.c b/drivers/sound/i2s-uclass.c
index e31d9933fff..94b33baec14 100644
--- a/drivers/sound/i2s-uclass.c
+++ b/drivers/sound/i2s-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <i2s.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int i2s_tx_data(struct udevice *dev, void *data, uint data_size)
 {
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index a7423d46c18..a1d8c36b4e8 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -19,6 +19,7 @@
 #include <pch.h>
 #include <sound.h>
 #include <asm/global_data.h>
+#include <asm/types.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 d1d560ae6da..9ac35730210 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -19,6 +19,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "maxim_codec.h"
 #include "max98088.h"
 
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index 16620c3e967..862beeccc43 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "maxim_codec.h"
 #include "max98090.h"
 
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index 18632511499..2119d851ffd 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -18,6 +18,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "i2s.h"
 #include "max98095.h"
 
diff --git a/drivers/sound/max98357a.c b/drivers/sound/max98357a.c
index 318dfe76e39..6c98b1b8e9e 100644
--- a/drivers/sound/max98357a.c
+++ b/drivers/sound/max98357a.c
@@ -18,6 +18,7 @@
 #ifdef CONFIG_X86
 #include <asm/acpi_nhlt.h>
 #endif
+#include <asm/types.h>
 #include <dt-bindings/sound/nhlt.h>
 #include <dm/acpi.h>
 #include <linux/errno.h>
diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
index 37fb5a5d340..5bb51c4b1b2 100644
--- a/drivers/sound/rockchip_i2s.c
+++ b/drivers/sound/rockchip_i2s.c
@@ -16,6 +16,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 ec93a44aec7..4bc11f41c99 100644
--- a/drivers/sound/rockchip_sound.c
+++ b/drivers/sound/rockchip_sound.c
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/periph.h>
 #include <dm/pinctrl.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int rockchip_sound_setup(struct udevice *dev)
 {
diff --git a/drivers/sound/rt5677.c b/drivers/sound/rt5677.c
index 3eb99f31a4a..ebf754e8afb 100644
--- a/drivers/sound/rt5677.c
+++ b/drivers/sound/rt5677.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "rt5677.h"
 #include <log.h>
 
diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
index 51cb9637bab..5b71678ef9c 100644
--- a/drivers/sound/samsung-i2s.c
+++ b/drivers/sound/samsung-i2s.c
@@ -15,6 +15,7 @@
 #include <asm/arch/i2s-regs.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define FIC_TX2COUNT(x)		(((x) >>  24) & 0xf)
 #define FIC_TX1COUNT(x)		(((x) >>  16) & 0xf)
diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
index 16fdb22ea9e..113b73443c3 100644
--- a/drivers/sound/samsung_sound.c
+++ b/drivers/sound/samsung_sound.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/power.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int samsung_sound_setup(struct udevice *dev)
 {
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
index b1c1fca004f..8528d77b60f 100644
--- a/drivers/sound/sandbox.c
+++ b/drivers/sound/sandbox.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <asm/sdl.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct sandbox_codec_priv {
 	int interface;
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index 86722d23c5c..41ab2440b63 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -12,6 +12,7 @@
 #include <sound.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define SOUND_BITS_IN_BYTE 8
 
diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c
index b0eab233916..80b196457b6 100644
--- a/drivers/sound/sound.c
+++ b/drivers/sound/sound.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <sound.h>
+#include <linux/types.h>
 
 void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
 			      uint freq, uint channels)
diff --git a/drivers/sound/tegra_ahub.c b/drivers/sound/tegra_ahub.c
index 345d9746f25..c3fac7afbc7 100644
--- a/drivers/sound/tegra_ahub.c
+++ b/drivers/sound/tegra_ahub.c
@@ -18,6 +18,7 @@
 #include <asm/arch-tegra/tegra_ahub.h>
 #include <asm/arch-tegra/tegra_i2s.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "tegra_i2s_priv.h"
 
 struct tegra_ahub_priv {
diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
index 7749cd47b70..d3f9b7a11f8 100644
--- a/drivers/sound/tegra_i2s.c
+++ b/drivers/sound/tegra_i2s.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2s.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "tegra_i2s_priv.h"
 
 int tegra_i2s_set_cif_tx_ctrl(struct udevice *dev, u32 value)
diff --git a/drivers/sound/tegra_i2s_priv.h b/drivers/sound/tegra_i2s_priv.h
index 7cd3fc808c8..96469e025fe 100644
--- a/drivers/sound/tegra_i2s_priv.h
+++ b/drivers/sound/tegra_i2s_priv.h
@@ -7,6 +7,7 @@
 #ifndef __TEGRA_I2S_PRIV_H
 #define __TEGRA_I2S_PRIV_H
 
+#include <asm/types.h>
 enum {
 	/* Set i2s device (in buf) */
 	AHUB_MISCOP_SET_I2S,
diff --git a/drivers/sound/tegra_sound.c b/drivers/sound/tegra_sound.c
index d76448c7e4d..e555bae9522 100644
--- a/drivers/sound/tegra_sound.c
+++ b/drivers/sound/tegra_sound.c
@@ -15,6 +15,7 @@
 #include <sound.h>
 #include <asm/gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "tegra_i2s_priv.h"
 
 static int tegra_sound_setup(struct udevice *dev)
diff --git a/drivers/sound/wm8994.c b/drivers/sound/wm8994.c
index e8ec0517d15..bcb30696f57 100644
--- a/drivers/sound/wm8994.c
+++ b/drivers/sound/wm8994.c
@@ -19,6 +19,7 @@
 #include <asm/arch/sound.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "wm8994.h"
 #include "wm8994_registers.h"
 
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index c9ef5a69ea9..450a60abad7 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -16,6 +16,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.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 ab60a47945d..5229703e936 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c
index 70bedc7fbe3..f307c44f62b 100644
--- a/drivers/spi/ath79_spi.c
+++ b/drivers/spi/ath79_spi.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <compiler.h>
 #include <spi.h>
 #include <dm.h>
 #include <div64.h>
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index c69d7154cb5..fc36a2e05c0 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -9,7 +9,9 @@
  * Author: Piotr Bugalski <bugalski.piotr at gmail.com>
  */
 
+#include <compiler.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <clk.h>
@@ -25,6 +27,7 @@
 #include <linux/iopoll.h>
 #include <linux/ioport.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <mach/clk.h>
 #include <spi.h>
 #include <spi-mem.h>
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 5e4ae989c18..e5fdb323f86 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /*
  * Register definitions for the Atmel AT32/AT91 SPI Controller
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index 6e2c476d281..91acebec950 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -20,6 +21,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define HSSPI_PP			0
 
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index ac79961a14e..1dd3d6bcf5f 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -18,6 +19,7 @@
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* BCM6348 SPI core */
 #define SPI_6348_CLK			0x06
diff --git a/drivers/spi/bcmstb_spi.c b/drivers/spi/bcmstb_spi.c
index 27ed0203add..bc97c29cecb 100644
--- a/drivers/spi/bcmstb_spi.c
+++ b/drivers/spi/bcmstb_spi.c
@@ -22,6 +22,7 @@
 #include <time.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 4b77a6b4b72..0b2b38d5a9c 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include "cadence_qspi.h"
 
 #define CQSPI_STIG_READ			0
diff --git a/drivers/spi/cadence_qspi.h b/drivers/spi/cadence_qspi.h
index 0ecd461b79a..f697d3d547b 100644
--- a/drivers/spi/cadence_qspi.h
+++ b/drivers/spi/cadence_qspi.h
@@ -9,6 +9,7 @@
 
 #include <reset.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 #define CQSPI_IS_ADDR(cmd_len)		(cmd_len > 1 ? 1 : 0)
 
diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index dc066f17e3d..10c77552f87 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -40,6 +40,7 @@
 #include <malloc.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "cadence_qspi.h"
 
 #define CQSPI_REG_POLL_US			1 /* 1us */
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 0a211b37707..d24348bce3c 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -25,6 +25,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct coldfire_spi_priv {
 	struct dspi *regs;
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 4ea77a15051..f4fb5e98d5f 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -22,6 +22,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* SPIGCR0 */
 #define SPIGCR0_SPIENA_MASK	0x1
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index a960c61f350..86b7bd8403f 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -10,7 +10,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm-generic/gpio.h>
 #include <clk.h>
@@ -27,6 +29,7 @@
 #include <linux/iopoll.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Register offsets */
 #define DW_SPI_CTRL0			0x00
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index 400269fa39d..1be1c1a3849 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index b5f7d3e08a7..d3c59f5818a 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -9,6 +9,7 @@
  * Haikun Wang (B53464 at freescale.com)
  */
 
+#include <compiler.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -29,6 +30,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* linux/include/time.h */
 #define NSEC_PER_SEC	1000000000L
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index ec500d86184..151525dabf3 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <malloc.h>
 #include <spi.h>
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 314d3f89484..51ad688557c 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -24,7 +24,9 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
@@ -41,6 +43,7 @@
 #include <spi.h>
 #include <spi-mem.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index bf6cd061b53..45e2869ba26 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -22,6 +22,7 @@
 #include <spi_flash.h>
 #include <spi-mem.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/fast_spi.h>
 #include <asm/io.h>
@@ -33,6 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ich.h"
 
diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h
index 23c7827740b..90c26854119 100644
--- a/drivers/spi/ich.h
+++ b/drivers/spi/ich.h
@@ -8,7 +8,9 @@
 #ifndef _ICH_H_
 #define _ICH_H_
 
+#include <compiler.h>
 #include <linux/bitops.h>
+#include <linux/types.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 a127135323d..67154db6a79 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -20,6 +20,7 @@
 #include <asm/arch/mpp.h>
 #endif
 #include <asm/arch-mvebu/spi.h>
+#include <linux/types.h>
 
 struct mvebu_spi_dev {
 	bool			is_errata_50mhz_ac;
diff --git a/drivers/spi/meson_spifc.c b/drivers/spi/meson_spifc.c
index f61bcd5e2de..e8573f9b652 100644
--- a/drivers/spi/meson_spifc.c
+++ b/drivers/spi/meson_spifc.c
@@ -14,12 +14,14 @@
 #include <dm.h>
 #include <regmap.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* register map */
 #define REG_CMD			0x00
diff --git a/drivers/spi/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c
index df1489a1e02..571964fdbb3 100644
--- a/drivers/spi/mpc8xx_spi.c
+++ b/drivers/spi/mpc8xx_spi.c
@@ -17,12 +17,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <mpc8xx.h>
 #include <spi.h>
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 f5ceeaac97d..6ef0a6c0e41 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/mpc8xxx_spi.h>
@@ -20,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0e6e1bf0143..1dd61d652a3 100644
--- a/drivers/spi/mscc_bb_spi.c
+++ b/drivers/spi/mscc_bb_spi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
@@ -15,6 +16,7 @@
 #include <stdbool.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c
index f4b5ad89245..f8be2980cdb 100644
--- a/drivers/spi/mt7621_spi.c
+++ b/drivers/spi/mt7621_spi.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <spi.h>
@@ -20,6 +21,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define MT7621_RX_FIFO_LEN	32
 #define MT7621_TX_FIFO_LEN	36
diff --git a/drivers/spi/mtk_snfi_spi.c b/drivers/spi/mtk_snfi_spi.c
index 07a178a8785..61b725658c1 100644
--- a/drivers/spi/mtk_snfi_spi.c
+++ b/drivers/spi/mtk_snfi_spi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <spi.h>
@@ -20,6 +21,7 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SNFI_MAC_CTL			0x500
 #define MAC_XIO_SEL			BIT(4)
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index f3e28d0ed69..7f4033295dc 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -17,6 +17,7 @@
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index db1673fa57d..f5e772ba0ff 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -23,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index abc7f014d7d..32325bec094 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -32,6 +32,7 @@
 #include <asm/mach-imx/dma.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define	MXS_SPI_MAX_TIMEOUT	1000000
 #define	MXS_SPI_PORT_OFFSET	0x2000
diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index fc75913022b..874dac8aaeb 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -14,6 +14,9 @@
  * data lines).
  *
  * FlexSPI controller is driven by the LUT(Look-up Table) registers
+#include <compiler.h>
+#include <stdbool.h>
+#include <linux/types.h>
  * LUT registers are a look-up-table for sequences of instructions.
  * A valid sequence consists of four LUT registers.
  * Maximum 32 LUT sequences can be programmed simultaneously.
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 3cee5a7fccd..0385b79702e 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -25,6 +25,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index e1fc5257839..faff7cf5b1b 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -19,6 +19,7 @@
 #include <spi.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/types.h>
 #include <asm/io.h>
diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c
index 5618ab21638..3e50daecc4b 100644
--- a/drivers/spi/pl022_spi.c
+++ b/drivers/spi/pl022_spi.c
@@ -12,6 +12,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/platform_data/spi_pl022.h>
 #include <linux/errno.h>
@@ -19,6 +20,7 @@
 #include <spi.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define SSP_CR0		0x000
 #define SSP_CR1		0x004
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index 95fcb5723f2..8566b70d82e 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -21,6 +22,7 @@
 #include <wait_bit.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define RPC_CMNCR		0x0000	/* R/W */
 #define RPC_CMNCR_MD		BIT(31)
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index ec998eda082..677c80253d6 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <log.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <time.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
@@ -25,6 +26,7 @@
 #include <asm/arch-rockchip/periph.h>
 #include <dm/pinctrl.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "rk_spi.h"
 
 /* Change to 1 to output registers at the start of each transaction */
diff --git a/drivers/spi/rk_spi.h b/drivers/spi/rk_spi.h
index 2e0d1eeb9fd..6a46fbfac7b 100644
--- a/drivers/spi/rk_spi.h
+++ b/drivers/spi/rk_spi.h
@@ -11,6 +11,7 @@
 #ifndef __RK_SPI_H
 #define __RK_SPI_H
 
+#include <asm/types.h>
 struct rockchip_spi {
 	u32 ctrlr0;
 	u32 ctrlr1;
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 7e08bf9dc54..b97a9e27994 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -11,6 +11,7 @@
 #define LOG_CATEGORY UCLASS_SPI
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
@@ -19,6 +20,7 @@
 #include <os.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <asm/spi.h>
diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c
index bf3a7bf919c..f6574c23552 100644
--- a/drivers/spi/sh_qspi.c
+++ b/drivers/spi/sh_qspi.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* SH QSPI register bit masks <REG>_<BIT> */
 #define SPCR_MSTR	0x08
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index 9818ecb4c18..e363b988718 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -21,6 +21,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/spi-mem-nodm.c b/drivers/spi/spi-mem-nodm.c
index 6cc908dcdf8..9c5de165d49 100644
--- a/drivers/spi/spi-mem-nodm.c
+++ b/drivers/spi/spi-mem-nodm.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <spi-mem.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 4081a50eaaf..369bf5962f7 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -13,6 +13,8 @@
 #include <linux/pm_runtime.h>
 #include "internals.h"
 #else
+#include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <spi.h>
 #include <spi-mem.h>
diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index cf94407759e..9b5869b132f 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -20,6 +20,7 @@
 #include <linux/log2.h>
 #include <clk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define SIFIVE_SPI_MAX_CS		32
 
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index 80c406d7b36..d5ab0703ae8 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -26,6 +26,7 @@
 #include <errno.h>
 #include <fdt_support.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <wait_bit.h>
 #include <asm/global_data.h>
@@ -33,6 +34,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <asm/bitops.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 6d397f2ebd2..6899b4d066e 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <dm/device-internal.h>
@@ -17,6 +18,7 @@
 #include <dm/util.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7662932d40a..bc2079a9266 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen)
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index e18e599e3b0..989f254438a 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -9,9 +9,11 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <log.h>
 #include <reset.h>
 #include <spi-mem.h>
+#include <stdbool.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
@@ -21,6 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 struct stm32_qspi_regs {
 	u32 cr;		/* 0x00 */
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index 635ead98dbd..5887aa8f61e 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -6,18 +6,21 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index 1b7246af258..a40a468002d 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -16,6 +16,7 @@
 #include <spi.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "tegra_spi.h"
 
 /* COMMAND1 */
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 7be4efd35c6..34663ced764 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -22,6 +22,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index 64485de5d32..2d3616b2ce7 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -18,6 +18,7 @@
 #include <fdtdec.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index 19e50919f6d..08d87adb1b6 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -20,6 +20,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra_spi.h b/drivers/spi/tegra_spi.h
index e997d668cde..93195abb1ea 100644
--- a/drivers/spi/tegra_spi.h
+++ b/drivers/spi/tegra_spi.h
@@ -3,6 +3,7 @@
  * (C) Copyright 2014 Google, Inc
  */
 
+#include <linux/types.h>
 struct tegra_spi_platdata {
 	enum periph_id periph_id;
 	int frequency;		/* Default clock frequency, -1 for none */
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 9fecdb20f73..cbbe93f9d50 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
@@ -27,6 +28,7 @@
 #include <linux/kernel.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 22cf974a905..cc4e20ce1eb 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -6,6 +6,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <time.h>
@@ -20,6 +21,7 @@
 #include <wait_bit.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 6b1cea4519e..3ccefd87a11 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -23,6 +23,7 @@
 #include <asm/io.h>
 #include <wait_bit.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 /*
  * [0]: http://www.xilinx.com/support/documentation
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index a95558139d8..4ae439a1238 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -18,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index bbac203e0dd..bc12da9bccf 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index de988f4e975..aa69cb17bf9 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define GQSPI_GFIFO_STRT_MODE_MASK	BIT(29)
 #define GQSPI_CONFIG_MODE_EN_MASK	(3 << 30)
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 9212449a7ee..8f73fd7e449 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <spmi/spmi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spmi/spmi-sandbox.c b/drivers/spmi/spmi-sandbox.c
index e2f6fc17e71..d58c5684b68 100644
--- a/drivers/spmi/spmi-sandbox.c
+++ b/drivers/spmi/spmi-sandbox.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <spmi/spmi.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/spmi/spmi-uclass.c b/drivers/spmi/spmi-uclass.c
index fc8252fbc91..0126f9dd75f 100644
--- a/drivers/spmi/spmi-uclass.c
+++ b/drivers/spmi/spmi-uclass.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <spmi/spmi.h>
 #include <linux/ctype.h>
 
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 015b938b1b7..6453d53a979 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int sysreset_request(struct udevice *dev, enum sysreset_t type)
 {
diff --git a/drivers/sysreset/sysreset_ast.c b/drivers/sysreset/sysreset_ast.c
index f93eea629df..46e6565191b 100644
--- a/drivers/sysreset/sysreset_ast.c
+++ b/drivers/sysreset/sysreset_ast.c
@@ -11,6 +11,7 @@
 #include <wdt.h>
 #include <asm/io.h>
 #include <asm/arch/wdt.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 0027efd4864..2620e7402e9 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <sysreset.h>
 #include <vsprintf.h>
@@ -16,6 +17,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "sysreset_mpc83xx.h"
 
diff --git a/drivers/sysreset/sysreset_octeon.c b/drivers/sysreset/sysreset_octeon.c
index 963ec20dc0b..1005227c6bf 100644
--- a/drivers/sysreset/sysreset_octeon.c
+++ b/drivers/sysreset/sysreset_octeon.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <sysreset.h>
diff --git a/drivers/sysreset/sysreset_socfpga.c b/drivers/sysreset/sysreset_socfpga.c
index c348649cedf..8f8f6411a8a 100644
--- a/drivers/sysreset/sysreset_socfpga.c
+++ b/drivers/sysreset/sysreset_socfpga.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <errno.h>
 #include <sysreset.h>
diff --git a/drivers/sysreset/sysreset_sti.c b/drivers/sysreset/sysreset_sti.c
index 26431ee129b..b4e5c58b45a 100644
--- a/drivers/sysreset/sysreset_sti.c
+++ b/drivers/sysreset/sysreset_sti.c
@@ -5,12 +5,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
 #include <sysreset.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
index e6e98b383ee..492f2c50c05 100644
--- a/drivers/sysreset/sysreset_syscon.c
+++ b/drivers/sysreset/sysreset_syscon.c
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct syscon_reboot_priv {
 	struct regmap *regmap;
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index 0ab2b543abd..5285696780a 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -13,6 +13,7 @@
 #include <acpi/acpi_s3.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 struct x86_sysreset_platdata {
diff --git a/drivers/tee/broadcom/chimp_optee.c b/drivers/tee/broadcom/chimp_optee.c
index 545bb3fe222..82c77871a0b 100644
--- a/drivers/tee/broadcom/chimp_optee.c
+++ b/drivers/tee/broadcom/chimp_optee.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <string.h>
 #include <tee.h>
+#include <asm/types.h>
 #include <broadcom/chimp.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index fb656bed92f..dd9649bd93d 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <tee.h>
 #include <linux/arm-smccc.h>
 #include <linux/err.h>
@@ -14,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "optee_smc.h"
 #include "optee_msg.h"
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
index 9442d1c176b..eca0f7821fc 100644
--- a/drivers/tee/optee/optee_private.h
+++ b/drivers/tee/optee/optee_private.h
@@ -8,6 +8,7 @@
 
 #include <tee.h>
 #include <log.h>
+#include <linux/types.h>
 
 /**
  * struct optee_private - OP-TEE driver private data
diff --git a/drivers/tee/optee/optee_smc.h b/drivers/tee/optee/optee_smc.h
index ba8a43d5c09..4fc9c0ec862 100644
--- a/drivers/tee/optee/optee_smc.h
+++ b/drivers/tee/optee/optee_smc.h
@@ -7,6 +7,7 @@
 #define OPTEE_SMC_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/arm-smccc.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb.c
index a9ea53854fc..bb8f96d1ad5 100644
--- a/drivers/tee/optee/rpmb.c
+++ b/drivers/tee/optee/rpmb.c
@@ -10,6 +10,7 @@
 #include <mmc.h>
 #include <dm/device_compat.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "optee_msg.h"
 #include "optee_private.h"
diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c
index 3a5d106f956..3b714e91c00 100644
--- a/drivers/tee/sandbox.c
+++ b/drivers/tee/sandbox.c
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <tee/optee_ta_avb.h>
 
 /*
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index 1dc806db89b..f08b9a70f32 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -13,6 +13,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * struct tee_uclass_priv - information of a TEE, stored by the uclass
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 6b822f18854..81c0abdbcde 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 812c2ec07c3..e0ec5f60620 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -17,6 +17,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/math64.h>
diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c
index 8a67d9aa58c..f0094d4521a 100644
--- a/drivers/thermal/imx_tmu.c
+++ b/drivers/thermal/imx_tmu.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <stdbool.h>
@@ -21,6 +22,7 @@
 #include <thermal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/thermal/ti-bandgap.c b/drivers/thermal/ti-bandgap.c
index 8b332f116c3..160557321be 100644
--- a/drivers/thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-bandgap.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <thermal.h>
+#include <linux/types.h>
 
 #define CTRL_CORE_TEMP_SENSOR_MPU	0
 #define DRA752_ADC_START_VALUE		540
diff --git a/drivers/timer/ag101p_timer.c b/drivers/timer/ag101p_timer.c
index c011906b938..7d0eae96b75 100644
--- a/drivers/timer/ag101p_timer.c
+++ b/drivers/timer/ag101p_timer.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <timer.h>
+#include <asm/types.h>
 #include <linux/io.h>
 
 /*
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 6cb2923e0b6..08407a48ef6 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 <asm/types.h>
 #include <linux/bitops.h>
 
 /* control register */
diff --git a/drivers/timer/arc_timer.c b/drivers/timer/arc_timer.c
index 592b196cbbc..d5ce91b6df7 100644
--- a/drivers/timer/arc_timer.c
+++ b/drivers/timer/arc_timer.c
@@ -11,6 +11,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index 5d4ae685092..ad57a513f79 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <timer.h>
+#include <asm/types.h>
 #include <linux/io.h>
 
 #define REG32_TMR(x)	(*(u32 *)	((plat->regs) + (x>>2)))
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 07459d9c26b..4f5d895a38a 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 1ad3b5db8fe..6be6b20f173 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 #define CNT_CNTRL_RESET		BIT(4)
 
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 700b4097373..33f49c129de 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -19,6 +19,7 @@
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index 7aec7a7d59e..9d41739dac2 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -8,9 +8,11 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/timer/nomadik-mtu-timer.c b/drivers/timer/nomadik-mtu-timer.c
index 5d5eadc47d7..c50db9b273b 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 <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 20dddd53e4f..b49ac1b419b 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -16,6 +16,7 @@
 #include <timer.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/sti-timer.c b/drivers/timer/sti-timer.c
index 2278b049354..8e43f47a307 100644
--- a/drivers/timer/sti-timer.c
+++ b/drivers/timer/sti-timer.c
@@ -10,6 +10,7 @@
 #include <timer.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/arch-armv7/globaltimer.h>
diff --git a/drivers/timer/stm32_timer.c b/drivers/timer/stm32_timer.c
index 96749c8a64f..08d8470c278 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <timer.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 7dea5b32637..4f2d84c6420 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -16,6 +16,7 @@
 #include <timer.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index e3cb7e4fe7e..e93eced4873 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <time.h>
 #include <timer.h>
 #include <vsprintf.h>
@@ -25,6 +26,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define MAX_NUM_FREQS	9
 
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index 6fbde9f2553..ddb5a21e772 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -13,6 +13,7 @@
 #include <irq.h>
 #include <log.h>
 #include <spl.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <tpm-v2.h>
@@ -25,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 23400235a4c..b52aa66d5ad 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 249cf11beff..58036c9f59b 100644
--- a/drivers/tpm/tpm2_ftpm_tee.c
+++ b/drivers/tpm/tpm2_ftpm_tee.c
@@ -21,6 +21,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "tpm_tis.h"
 #include "tpm2_ftpm_tee.h"
diff --git a/drivers/tpm/tpm2_ftpm_tee.h b/drivers/tpm/tpm2_ftpm_tee.h
index 44f9598c28a..3c3b2844343 100644
--- a/drivers/tpm/tpm2_ftpm_tee.h
+++ b/drivers/tpm/tpm2_ftpm_tee.h
@@ -7,6 +7,7 @@
 #define __TPM2_FTPM_TEE_H__
 
 /* This UUID is generated with uuidgen */
+#include <asm/types.h>
 #define TA_FTPM_UUID { 0xBC50D971, 0xD4C9, 0x42C4, \
 	{0x82, 0xCB, 0x34, 0x3F, 0xB7, 0xF3, 0x78, 0x96} }
 
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index f9d1205d321..4b3853f45ce 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -15,6 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 /* Hierarchies */
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 48b59f8c36f..47668152401 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -18,6 +18,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <spi.h>
+#include <stdbool.h>
 #include <time.h>
 #include <tpm-v2.h>
 #include <vsprintf.h>
diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c
index c8b597d43cc..7cf1d494f16 100644
--- a/drivers/tpm/tpm_atmel_twi.c
+++ b/drivers/tpm/tpm_atmel_twi.c
@@ -15,6 +15,7 @@
 #include <asm/unaligned.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "tpm_internal.h"
 
diff --git a/drivers/tpm/tpm_internal.h b/drivers/tpm/tpm_internal.h
index 787cc6bf281..b3275d0ca17 100644
--- a/drivers/tpm/tpm_internal.h
+++ b/drivers/tpm/tpm_internal.h
@@ -6,6 +6,7 @@
 #ifndef __tpm_internal_h
 #define __tpm_internal_h
 
+#include <asm/types.h>
 enum {
 	TPM_MAX_ORDINAL			= 243,
 	TPM_MAX_PROTECTED_ORDINAL	= 12,
diff --git a/drivers/tpm/tpm_tis.h b/drivers/tpm/tpm_tis.h
index 2a160fe05c9..c38fa2e544d 100644
--- a/drivers/tpm/tpm_tis.h
+++ b/drivers/tpm/tpm_tis.h
@@ -18,6 +18,7 @@
 #ifndef _TPM_TIS_I2C_H
 #define _TPM_TIS_I2C_H
 
+#include <compiler.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 9b81ec98aa8..9bc57c56ea4 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -24,6 +24,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define PREFIX "lpc_tpm: "
 
diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c
index 433b21d49e7..ffdd86fbd8d 100644
--- a/drivers/tpm/tpm_tis_sandbox.c
+++ b/drivers/tpm/tpm_tis_sandbox.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <dm.h>
 #include <stdbool.h>
@@ -14,6 +15,7 @@
 #include <asm/unaligned.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 /* TPM NVRAM location indices. */
diff --git a/drivers/ufs/cdns-platform.c b/drivers/ufs/cdns-platform.c
index 1a7bb7bed8a..52c267acbea 100644
--- a/drivers/ufs/cdns-platform.c
+++ b/drivers/ufs/cdns-platform.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <ufs.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
diff --git a/drivers/ufs/ti-j721e-ufs.c b/drivers/ufs/ti-j721e-ufs.c
index d875269760c..ca9d7dbdec7 100644
--- a/drivers/ufs/ti-j721e-ufs.c
+++ b/drivers/ufs/ti-j721e-ufs.c
@@ -3,10 +3,12 @@
  * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
  */
 
+#include <compiler.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 17c223ed76b..fb97c69d529 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <dm/device_compat.h>
@@ -26,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/dma-mapping.h>
 
diff --git a/drivers/ufs/ufs.h b/drivers/ufs/ufs.h
index 89fa47eddef..82f9e038182 100644
--- a/drivers/ufs/ufs.h
+++ b/drivers/ufs/ufs.h
@@ -2,9 +2,11 @@
 #ifndef __UFS_H
 #define __UFS_H
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <linux/types.h>
 
 #include "unipro.h"
 
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 370856c9bfe..023131b12ab 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -6,9 +6,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <asm-generic/io.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h
index 70cc3866643..002da7aa24e 100644
--- a/drivers/usb/cdns3/core.h
+++ b/drivers/usb/cdns3/core.h
@@ -8,6 +8,7 @@
  * Authors: Peter Chen <peter.chen at nxp.com>
  *          Pawel Laszczak <pawell at cadence.com>
  */
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
index e84fb57b2e0..09dd5f58d54 100644
--- a/drivers/usb/cdns3/drd.c
+++ b/drivers/usb/cdns3/drd.c
@@ -10,7 +10,9 @@
  *
  *
  */
+#include <compiler.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index f41d4a162cc..7499a51f4a6 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -10,7 +10,9 @@
  *          Peter Chen <peter.chen at nxp.com>
  */
 
+#include <compiler.h>
 #include <cpu_func.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
@@ -18,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 a04e5fd6101..f04ec8776ae 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -56,7 +56,9 @@
  *
  */
 
+#include <compiler.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
@@ -67,6 +69,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/gadget.h>
 #include <linux/compat.h>
 #include <linux/iopoll.h>
diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
index 42216fdc259..d9cbc0603c0 100644
--- a/drivers/usb/cdns3/gadget.h
+++ b/drivers/usb/cdns3/gadget.h
@@ -11,8 +11,10 @@
  */
 #ifndef __LINUX_CDNS3_GADGET
 #define __LINUX_CDNS3_GADGET
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0299e5adb0c..99944526bcf 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <usb.h>
 #include <vsprintf.h>
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c
index ad20ef34059..d097154c07e 100644
--- a/drivers/usb/common/fsl-errata.c
+++ b/drivers/usb/common/fsl-errata.c
@@ -9,6 +9,7 @@
 #include <hwconfig.h>
 #include <fsl_errata.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 #include<fsl_usb.h>
 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 9889a6c9e81..93556515a0b 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -28,6 +28,7 @@
 #include <dm.h>
 #include <generic-phy.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 44533fd7fed..7eb393453b7 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -17,8 +17,10 @@
 #ifndef __DRIVERS_USB_DWC3_CORE_H
 #define __DRIVERS_USB_DWC3_CORE_H
 
+#include <compiler.h>
 #include <linux/bitops.h>
 #include <linux/ioport.h>
+#include <linux/types.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/otg.h>
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 54a9ffb9d68..90dafb0963f 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <malloc.h>
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 2d722376efb..b62fc8afdb5 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -14,10 +14,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dwc3-omap-uboot.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c
index 54b52dcd66a..4f5d4c15939 100644
--- a/drivers/usb/dwc3/dwc3-uniphier.c
+++ b/drivers/usb/dwc3/dwc3-uniphier.c
@@ -6,12 +6,14 @@
  *   Author: Masahiro Yamada <yamada.masahiro at socionext.com>
  */
 
+#include <compiler.h>
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 #define UNIPHIER_PRO4_DWC3_RESET	0x40
 #define   UNIPHIER_PRO4_DWC3_RESET_XIOMMU	BIT(5)
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 80de10ec125..1d4d0d612a1 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -13,6 +13,7 @@
  * commit c00552ebaf : Merge 3.18-rc7 into usb-next
  */
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm/device_compat.h>
 #include <linux/bug.h>
@@ -20,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e4c6042bee8..0024991c8f5 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
@@ -28,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h
index 2f2eb18b99f..85a144444a7 100644
--- a/drivers/usb/dwc3/gadget.h
+++ b/drivers/usb/dwc3/gadget.h
@@ -20,6 +20,7 @@
 
 #include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/types.h>
 #include <linux/usb/gadget.h>
 #include "io.h"
 
diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h
index f5268d752c3..a60807d6c01 100644
--- a/drivers/usb/dwc3/io.h
+++ b/drivers/usb/dwc3/io.h
@@ -17,9 +17,11 @@
 #ifndef __DRIVERS_USB_DWC3_IO_H
 #define __DRIVERS_USB_DWC3_IO_H
 
+#include <compiler.h>
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define	CACHELINE_SIZE		CONFIG_SYS_CACHELINE_SIZE
 static inline u32 dwc3_readl(void __iomem *base, u32 offset)
diff --git a/drivers/usb/dwc3/linux-compat.h b/drivers/usb/dwc3/linux-compat.h
index 92a3dc2850b..49848397f6b 100644
--- a/drivers/usb/dwc3/linux-compat.h
+++ b/drivers/usb/dwc3/linux-compat.h
@@ -12,6 +12,7 @@
 #define __DWC3_LINUX_COMPAT__
 
 #include <linux/string.h>
+#include <linux/types.h>
 #define dev_WARN(dev, format, arg...)	debug(format, ##arg)
 
 static inline size_t strlcat(char *dest, const char *src, size_t n)
diff --git a/drivers/usb/dwc3/samsung_usb_phy.c b/drivers/usb/dwc3/samsung_usb_phy.c
index abbd4136890..789968951ba 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 <asm/types.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 ea512ea8ffb..1ecfda8275e 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -17,8 +17,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <ti-usb-phy-uboot.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index f7090195c14..210bbfd7c24 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <os.h>
@@ -13,6 +14,7 @@
 #include <usb.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * This driver emulates a flash stick using the UFI command specification and
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 68e5f12f35d..339ada4a29d 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -13,6 +13,7 @@
 #include <usb.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * This driver emulates a USB keyboard using the USB HID specification (boot
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index 8d24556c2c4..97aa60189a1 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -7,11 +7,13 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <usb.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static int copy_to_unicode(char *buff, int length, const char *str)
 {
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index de25ba12f61..a293fb714bc 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 
 /* ASIX AX8817X based USB 2.0 Ethernet Devices */
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index c1c873c2c2b..c45e4a6da61 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/eth/lan75xx.c b/drivers/usb/eth/lan75xx.c
index 7d828d75dc6..78d1fb5107b 100644
--- a/drivers/usb/eth/lan75xx.c
+++ b/drivers/usb/eth/lan75xx.c
@@ -9,6 +9,7 @@
 #include <linux/bitops.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 #include "lan7x.h"
 
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index 194753fb278..c571f03a645 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -10,6 +10,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 #include "lan7x.h"
 
diff --git a/drivers/usb/eth/lan7x.c b/drivers/usb/eth/lan7x.c
index 503d36c8d9f..94cf1e46ba2 100644
--- a/drivers/usb/eth/lan7x.c
+++ b/drivers/usb/eth/lan7x.c
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 #include "lan7x.h"
 
diff --git a/drivers/usb/eth/lan7x.h b/drivers/usb/eth/lan7x.h
index 57c8293a895..9389ba35bf8 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* USB Vendor Requests */
 #define USB_VENDOR_REQUEST_WRITE_REGISTER	0xA0
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index f223d96559f..a49e976cf10 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <log.h>
 #include <net.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
 #include <linux/delay.h>
@@ -25,6 +26,7 @@
 #include <usb.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "usb_ether.h"
 
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index f7c46fbc25f..aeb7ba52c01 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <usb.h>
 #include <vsprintf.h>
@@ -21,6 +22,7 @@
 #include <linux/mii.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 #include "r8152.h"
 
diff --git a/drivers/usb/eth/r8152.h b/drivers/usb/eth/r8152.h
index 378eb8c8124..d6e201c757c 100644
--- a/drivers/usb/eth/r8152.h
+++ b/drivers/usb/eth/r8152.h
@@ -7,8 +7,10 @@
 #ifndef _RTL8152_ETH_H
 #define _RTL8152_ETH_H
 
+#include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
+#include <linux/types.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 2211dc9489e..639670bfd85 100644
--- a/drivers/usb/eth/r8152_fw.c
+++ b/drivers/usb/eth/r8152_fw.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 48216025448..1e8529fe9ee 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/mii.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "usb_ether.h"
 
 /* SMSC LAN95xx based USB 2.0 Ethernet Devices */
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index ce86d2cd255..a5de82cc15b 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -16,6 +16,7 @@
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "usb_ether.h"
 
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index e5a8872f715..fe0f91d586b 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -14,6 +14,7 @@
 #undef	PACKET_TRACE
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
@@ -25,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <mach/at91_matrix.h>
 #include <linux/list.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/at91_udc.h b/drivers/usb/gadget/at91_udc.h
index 2b2e73420ad..f86e2a3ca7a 100644
--- a/drivers/usb/gadget/at91_udc.h
+++ b/drivers/usb/gadget/at91_udc.h
@@ -13,6 +13,8 @@
  * Based on AT91RM9200 datasheet revision E.
  */
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define AT91_UDP_FRM_NUM	0x00		/* Frame Number Register */
 #define     AT91_UDP_NUM	(0x7ff <<  0)	/* Frame Number */
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 03bbe1edb62..e98d63b9fbf 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -17,6 +17,7 @@
 #include <linux/list.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/atmel_usba_udc.h>
diff --git a/drivers/usb/gadget/atmel_usba_udc.h b/drivers/usb/gadget/atmel_usba_udc.h
index b0692e27954..d1edf95f273 100644
--- a/drivers/usb/gadget/atmel_usba_udc.h
+++ b/drivers/usb/gadget/atmel_usba_udc.h
@@ -11,6 +11,7 @@
 #define __LINUX_USB_GADGET_USBA_UDC_H__
 
 /* USB register offsets */
+#include <asm/types.h>
 #include <linux/kernel.h>
 #define USBA_CTRL				0x0000
 #define USBA_FNUM				0x0004
diff --git a/drivers/usb/gadget/bcm_udc_otg.h b/drivers/usb/gadget/bcm_udc_otg.h
index 24cc936c6b4..52a0110bf85 100644
--- a/drivers/usb/gadget/bcm_udc_otg.h
+++ b/drivers/usb/gadget/bcm_udc_otg.h
@@ -7,6 +7,7 @@
 #define __BCM_UDC_OTG_H
 
 #include <common.h>
+#include <linux/types.h>
 
 static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask)
 {
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 5f92c484b93..29805ca65e6 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -9,10 +9,12 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <net.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/byteorder.h>
 #include <asm/cache.h>
diff --git a/drivers/usb/gadget/ci_udc.h b/drivers/usb/gadget/ci_udc.h
index c5ef74d74f8..cbd7ea893a0 100644
--- a/drivers/usb/gadget/ci_udc.h
+++ b/drivers/usb/gadget/ci_udc.h
@@ -7,6 +7,7 @@
 #define __GADGET__CI_UDC_H__
 
 #include <stdbool.h>
+#include <linux/types.h>
 #define NUM_ENDPOINTS		6
 
 #ifdef CONFIG_CI_UDC_HAS_HOSTPC
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 30c26a64105..7fa79b3bfdc 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
+#include <compiler.h>
+#include <linux/types.h>
  * composite.c - infrastructure for Composite USB Gadgets
  *
  * Copyright (C) 2006-2008 David Brownell
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index e96782644f3..39ec1889dae 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <asm/unaligned.h>
 #include <linux/errno.h>
 #include <linux/list.h>
diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
index 3781d25fd6d..ee8ebb37a04 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -19,6 +19,7 @@
 #include <malloc.h>
 #include <serial.h>
 #include <usbdevice.h>
+#include <asm/types.h>
 
 #define MAX_INTERFACES 2
 
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index 82d07349e47..051fed62228 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 04a6b7129bb..ae0ba5778fe 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -19,11 +19,13 @@
 #undef DEBUG
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
 #include <malloc.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
@@ -32,6 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <linux/list.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_priv.h b/drivers/usb/gadget/dwc2_udc_otg_priv.h
index e72b22ac61e..52c0727bcae 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_priv.h
+++ b/drivers/usb/gadget/dwc2_udc_otg_priv.h
@@ -7,6 +7,7 @@
 #ifndef __DWC2_UDC_OTG_PRIV__
 #define __DWC2_UDC_OTG_PRIV__
 
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/sizes.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_regs.h b/drivers/usb/gadget/dwc2_udc_otg_regs.h
index 2eda5c37206..62dc2b9488b 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 <asm/types.h>
 #include <linux/bitops.h>
 struct dwc2_usbotg_phy {
 	u32 phypwr;
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index ceb3a09840d..df1ef17cf9f 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -25,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static u8 clear_feature_num;
 int clear_feature_flag;
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index caab17473df..edcd732f895 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include <linux/usb/ch9.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 8a85f00c9d3..ff48a63efca 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -21,6 +21,7 @@
 #include <linux/netdevice.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/cdc.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index 281c0f29f2a..ef4c6dc878e 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -20,6 +20,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/usb/gadget/f_dfu.h b/drivers/usb/gadget/f_dfu.h
index a175e3f134b..ba82dab21e7 100644
--- a/drivers/usb/gadget/f_dfu.h
+++ b/drivers/usb/gadget/f_dfu.h
@@ -9,7 +9,9 @@
 #ifndef __F_DFU_H_
 #define __F_DFU_H_
 
+#include <compiler.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 #include <linux/usb/composite.h>
 
 #define DFU_CONFIG_VAL			1
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 12ca77299f6..2f46cf8e2ae 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -21,6 +21,7 @@
  * function can indicate that LUN is removable and/or CD-ROM.  (The
  * later implies read-only access.)
  *
+#include <linux/types.h>
  * MSF is configured by specifying a fsg_config structure.  It has the
  * following fields:
  *
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index e6aa089aa77..d907890b581 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -5,6 +5,7 @@
  * Eddie Cai <eddie.cai.linux at gmail.com>
  */
 #include <command.h>
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <env.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 5eb6474072c..c2588773b89 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -16,17 +16,20 @@
  * Parts of the implementation are based on f_dfu and f_thor.
  */
 
+#include <compiler.h>
 #include <errno.h>
 #include <common.h>
 #include <console.h>
 #include <env.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index 667f1e19c36..c69a90c3697 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <version.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/usb/gadget/f_thor.h b/drivers/usb/gadget/f_thor.h
index 8ba3fa21b73..995668afc43 100644
--- a/drivers/usb/gadget/f_thor.h
+++ b/drivers/usb/gadget/f_thor.h
@@ -9,6 +9,7 @@
 #ifndef _USB_THOR_H_
 #define _USB_THOR_H_
 
+#include <compiler.h>
 #include <linux/compiler.h>
 #include <linux/sizes.h>
 
diff --git a/drivers/usb/gadget/fotg210.c b/drivers/usb/gadget/fotg210.c
index 66952aab4fb..659e667d51c 100644
--- a/drivers/usb/gadget/fotg210.c
+++ b/drivers/usb/gadget/fotg210.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <log.h>
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index 9397f915a44..d6c7aba7ff7 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <malloc.h>
 #include <stdbool.h>
diff --git a/drivers/usb/gadget/ndis.h b/drivers/usb/gadget/ndis.h
index 753838f7941..7726c82d50e 100644
--- a/drivers/usb/gadget/ndis.h
+++ b/drivers/usb/gadget/ndis.h
@@ -22,6 +22,7 @@
 #define _USBGADGET_NDIS_H
 
 
+#include <linux/types.h>
 #define NDIS_STATUS_MULTICAST_FULL        0xC0010009
 #define NDIS_STATUS_MULTICAST_EXISTS      0xC001000A
 #define NDIS_STATUS_MULTICAST_NOT_FOUND   0xC001000B
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 71c918a64e4..5a8880d3f9d 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -35,6 +35,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 03a067888e4..966999ee540 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -14,6 +14,7 @@
 #include <asm/byteorder.h>
 #include <asm/io.h>
 #include <usbdevice.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <usb/pxa27x_udc.h>
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 5674e8fe494..12446e9795d 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -42,6 +42,7 @@
 
 /*
  * When FSG_BUFFHD_STATIC_BUFFER is defined when this file is included
+#include <asm/types.h>
  * the fsg_buffhd structure's buf field will be an array of FSG_BUFLEN
  * characters rather then a pointer to void.
  */
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index 1a5917e0cc5..b3193c54330 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 1095df170c7..56fc2456fa0 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <phys2bus.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <usb.h>
@@ -26,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <reset.h>
 
diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h
index 97a06c48f21..086712bba95 100644
--- a/drivers/usb/host/dwc2.h
+++ b/drivers/usb/host/dwc2.h
@@ -6,6 +6,7 @@
 #ifndef __DWC2_H__
 #define __DWC2_H__
 
+#include <asm/types.h>
 struct dwc2_hc_regs {
 	u32			hcchar;		/* 0x00 */
 	u32			hcsplt;
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index ceaf2aa2473..67a7ced589b 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <regmap.h>
 #include <reset-uclass.h>
diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c
index 2ce9f27b862..7026168a3ea 100644
--- a/drivers/usb/host/ehci-armada100.c
+++ b/drivers/usb/host/ehci-armada100.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <linux/types.h>
 #include "ehci.h"
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index dc6eb5b9bb6..00f92a6a297 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 9f1ec7ea926..3d79f1fae2c 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -22,6 +22,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 #include "ehci.h"
 
 /* Declare global data pointer */
diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c
index df81d5605a4..e1a3ab0bb2e 100644
--- a/drivers/usb/host/ehci-faraday.c
+++ b/drivers/usb/host/ehci-faraday.c
@@ -7,12 +7,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <usb.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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 c9303bfba2a..c46a466acd8 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 b9ad1785cea..bb782665221 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "ehci.h"
 #include <power/regulator.h>
 
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 05fe83c399c..16a34b46608 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/byteorder.h>
@@ -27,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index f419a0ab24b..a9849ffae77 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -13,6 +13,7 @@
 #include <asm/u-boot.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "ehci.h"
 #include <linux/mbus.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 4c4d0a48bc1..579daa92ad5 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <usb.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <usb/ehci-ci.h>
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 2b7c9cc80d7..214bd28d3c3 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <usb.h>
@@ -14,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 bb96c11f355..d5e6cca9b07 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <usb.h>
@@ -15,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 0cbc8ee75e9..f12c9e0beb9 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -10,6 +10,7 @@
 #include <asm/arch/imx-regs.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.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 f951e5d3a82..53d1324d661 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
@@ -14,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index cc5c9406112..4f659b11fa1 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -16,6 +16,7 @@
 #include <time.h>
 #include <usb.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index d8dbd77114a..b448f0dc551 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <usb.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-rmobile.c b/drivers/usb/host/ehci-rmobile.c
index 8e826163aa8..d0b0921dc80 100644
--- a/drivers/usb/host/ehci-rmobile.c
+++ b/drivers/usb/host/ehci-rmobile.c
@@ -12,6 +12,7 @@
 #include <asm/arch/ehci-rmobile.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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 2e3ea349a72..7e88fac14a1 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <usb.h>
 #include <linux/delay.h>
+#include <linux/types.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 605a0a1dc80..608dd703ea3 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -19,6 +19,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <usb.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/ulpi.h>
 #include <linux/libfdt.h>
 
diff --git a/drivers/usb/host/ehci-vct.c b/drivers/usb/host/ehci-vct.c
index 7167f82b481..334369638d8 100644
--- a/drivers/usb/host/ehci-vct.c
+++ b/drivers/usb/host/ehci-vct.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <usb.h>
+#include <asm/types.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 816d105087e..a90c4df2e25 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <usb.h>
@@ -24,6 +25,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/ehci-ci.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c
index 918e224e761..569baf84a9e 100644
--- a/drivers/usb/host/ehci-zynq.c
+++ b/drivers/usb/host/ehci-zynq.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <usb/ehci-ci.h>
 #include <usb/ulpi.h>
 
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 8e0755423a9..68922d91c00 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <usb.h>
 #include <generic-phy.h>
+#include <linux/types.h>
 
 /* Section 2.2.3 - N_PORTS */
 #define MAX_HC_PORTS		15
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index ecdd64c48cd..6d4f71d92e9 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -29,6 +29,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/byteorder.h>
 #include <dm.h>
@@ -38,6 +39,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 afb9e29f788..196bbbe1c99 100644
--- a/drivers/usb/host/ohci-lpc32xx.c
+++ b/drivers/usb/host/ohci-lpc32xx.c
@@ -19,6 +19,7 @@
 #include <asm/arch/i2c.h>
 #include <usb.h>
 #include <i2c.h>
+#include <asm/types.h>
 
 /* OTG I2C controller module register structures */
 struct otgi2c_regs {
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index a38cd25eb85..d4422ec452c 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -13,6 +13,7 @@
 
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
 # define ohci_readl(a) __swap_32(in_be32((u32 *)a))
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 66c20c103c0..5b4cfff8cfd 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -18,6 +18,7 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 #include "r8a66597.h"
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h
index b42389b9188..678712d524d 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -8,6 +8,7 @@
 #ifndef __R8A66597_H__
 #define __R8A66597_H__
 
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
 #define SYSCFG0		0x00
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 0b786e1d13e..9184a91c4e4 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -20,9 +20,11 @@
 
 #include <common.h>
 #include <mpc8xx.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <usb.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index 090cb2ae84e..78e4234da24 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <usb.h>
 #include <dm/root.h>
+#include <linux/types.h>
 
 struct sandbox_usb_ctrl {
 	int rootdev;
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 940baa549d3..aa8a616acc0 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -20,6 +20,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 extern bool usb_started; /* flag for the started/stopped USB status */
 static bool asynch_allowed;
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
index 3308b7e756a..bdb30b89c26 100644
--- a/drivers/usb/host/xhci-brcm.c
+++ b/drivers/usb/host/xhci-brcm.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index b96aea1e010..e10c4fdf617 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -17,6 +17,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 ee61c88e2aa..77ee798168c 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -29,6 +29,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 #include <linux/usb/dwc3.h>
 
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index 440f17f66d6..7eab30aabb9 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -8,11 +8,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <usb.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 #include <linux/usb/xhci-fsl.h>
 #include <linux/usb/dwc3.h>
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 16ddd0ab6cd..7677890d3f4 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/byteorder.h>
 #include <usb.h>
@@ -26,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <usb/xhci.h>
 
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 8ff71854fcd..4b6c7d278d7 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -6,6 +6,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dm/devres.h>
 #include <generic-phy.h>
@@ -13,6 +14,7 @@
 #include <usb.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <linux/iopoll.h>
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index bc3a9f4d018..f9d3facd1f6 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -6,12 +6,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <stdio.h>
 #include <usb.h>
 #include <linux/errno.h>
+#include <linux/types.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 00b7d8571d2..a6225def286 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -16,6 +16,7 @@
 #include <asm/omap_common.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/types.h>
 
 #include <linux/compat.h>
 #include <linux/usb/dwc3.h>
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 9fb6d2f7635..cb957f0172f 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <pci.h>
 #include <usb.h>
+#include <linux/types.h>
 #include <usb/xhci.h>
 
 static void xhci_pci_init(struct udevice *dev, struct xhci_hccr **ret_hccr,
diff --git a/drivers/usb/host/xhci-rcar-r8a779x_usb3_v3.h b/drivers/usb/host/xhci-rcar-r8a779x_usb3_v3.h
index f0f48a3354c..e04dba8c7d4 100644
--- a/drivers/usb/host/xhci-rcar-r8a779x_usb3_v3.h
+++ b/drivers/usb/host/xhci-rcar-r8a779x_usb3_v3.h
@@ -48,6 +48,7 @@
 #ifndef __FIRMWARE_R8A779X_USB3_V3__
 #define __FIRMWARE_R8A779X_USB3_V3__
 
+#include <asm/types.h>
 static const u32 firmware_r8a779x_usb3_v3[] = {
 	0xf4c455aa, 0x00d20014, 0x00000000, 0x23dc00e8,
 	0x00000000, 0x1a5c2007, 0x0001ff63, 0x001eff80,
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index a343d4d098c..40ac9a6f280 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
@@ -17,6 +18,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 221a2dbfd08..71146d5b707 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/byteorder.h>
@@ -24,6 +25,7 @@
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <usb/xhci.h>
 
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 90b9c9e0bb3..5e08c9c3195 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -23,6 +23,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/byteorder.h>
 #include <usb.h>
@@ -36,6 +37,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <usb/xhci.h>
 
 #ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 8d8aa779467..577774b7694 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -25,8 +25,10 @@
 #include <plat/usb.h>
 #else
 #include <common.h>
+#include <compiler.h>
 #include <time.h>
 #include <asm/omap_musb.h>
+#include <asm/types.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 8c44ed2429f..2937a7a16bc 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -14,9 +14,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/musb-new/mt85xx.c b/drivers/usb/musb-new/mt85xx.c
index 6bf1909f1ad..fce224afe94 100644
--- a/drivers/usb/musb-new/mt85xx.c
+++ b/drivers/usb/musb-new/mt85xx.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <dm/lists.h>
 #include <dm/root.h>
@@ -20,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 0a537fc4552..1947463a778 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -80,6 +80,8 @@
 #include <linux/io.h>
 #else
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <usb.h>
 #include <vsprintf.h>
 #include <linux/bitops.h>
@@ -87,6 +89,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
diff --git a/drivers/usb/musb-new/musb_core.h b/drivers/usb/musb-new/musb_core.h
index 91b1ec33045..8b0372ae804 100644
--- a/drivers/usb/musb-new/musb_core.h
+++ b/drivers/usb/musb-new/musb_core.h
@@ -20,6 +20,9 @@
 #include <linux/usb.h>
 #include <linux/usb/otg.h>
 #else
+#include <compiler.h>
+#include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #endif
diff --git a/drivers/usb/musb-new/musb_dma.h b/drivers/usb/musb-new/musb_dma.h
index 5ad64ed3436..3a51d3a5620 100644
--- a/drivers/usb/musb-new/musb_dma.h
+++ b/drivers/usb/musb-new/musb_dma.h
@@ -10,7 +10,9 @@
 #ifndef __MUSB_DMA_H__
 #define __MUSB_DMA_H__
 
+#include <compiler.h>
 #include <stdbool.h>
+#include <linux/types.h>
 struct musb_hw_ep;
 
 /*
diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index 14d8cfb70fc..292870f1ad4 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -32,9 +32,11 @@
 #include <plat/usb.h>
 #else
 #include <common.h>
+#include <compiler.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/omap_musb.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include "linux-compat.h"
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 949bea72aae..39902aaa030 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -23,11 +23,13 @@
 #include <linux/slab.h>
 #else
 #include <common.h>
+#include <compiler.h>
 #include <vsprintf.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include "linux-compat.h"
 #endif
diff --git a/drivers/usb/musb-new/musb_gadget.h b/drivers/usb/musb-new/musb_gadget.h
index 4ae18f910fc..97861130390 100644
--- a/drivers/usb/musb-new/musb_gadget.h
+++ b/drivers/usb/musb-new/musb_gadget.h
@@ -15,6 +15,7 @@
 #ifdef __UBOOT__
 #include <asm/byteorder.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #endif
diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 769aa25f175..bd893ac9e2c 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -19,8 +19,10 @@
 #include <linux/interrupt.h>
 #else
 #include <common.h>
+#include <compiler.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "linux-compat.h"
 #include <asm/processor.h>
 #endif
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c
index 5fa013659c5..b7ba5cb9f6d 100644
--- a/drivers/usb/musb-new/musb_host.c
+++ b/drivers/usb/musb-new/musb_host.c
@@ -22,8 +22,11 @@
 #include <linux/dma-mapping.h>
 #else
 #include <common.h>
+#include <compiler.h>
+#include <stdbool.h>
 #include <usb.h>
 #include <linux/bug.h>
+#include <linux/types.h>
 #include "linux-compat.h"
 #include "usb-compat.h"
 #endif
diff --git a/drivers/usb/musb-new/musb_io.h b/drivers/usb/musb-new/musb_io.h
index 72a53656321..ff572712821 100644
--- a/drivers/usb/musb-new/musb_io.h
+++ b/drivers/usb/musb-new/musb_io.h
@@ -17,7 +17,9 @@
 #ifndef __UBOOT__
 #include <linux/io.h>
 #else
+#include <compiler.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #endif
 
 #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \
diff --git a/drivers/usb/musb-new/musb_regs.h b/drivers/usb/musb-new/musb_regs.h
index c4d7203b851..20b00b3e1b1 100644
--- a/drivers/usb/musb-new/musb_regs.h
+++ b/drivers/usb/musb-new/musb_regs.h
@@ -94,6 +94,8 @@
 #define MUSB_CSR0_H_SETUPPKT		0x0008
 #define MUSB_CSR0_H_RXSTALL		0x0004
 
+#include <compiler.h>
+#include <asm/types.h>
 /* CSR0 bits to avoid zeroing (write zero clears, write 1 ignored) */
 #define MUSB_CSR0_P_WZC_BITS	\
 	(MUSB_CSR0_P_SENTSTALL)
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 9d22b50b8c3..2773ffad97e 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -1,9 +1,11 @@
 #include <common.h>
 #include <console.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <watchdog.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index b609034184f..3316f7dc6ac 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -14,6 +14,7 @@
 #include <serial.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index e9554bc5328..36ad3d67ff4 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -10,8 +10,10 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index b49954fe146..28f6a679933 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -17,12 +17,14 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <generic-phy.h>
 #include <log.h>
 #include <malloc.h>
 #include <phy-sun4i-usb.h>
 #include <reset.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
@@ -37,6 +39,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.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 e4382a30969..09a74bd6b75 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
diff --git a/drivers/usb/musb-new/usb-compat.h b/drivers/usb/musb-new/usb-compat.h
index f2c18ad3a2e..72112df5f98 100644
--- a/drivers/usb/musb-new/usb-compat.h
+++ b/drivers/usb/musb-new/usb-compat.h
@@ -2,6 +2,7 @@
 #define __USB_COMPAT_H__
 
 #include <dm.h>
+#include <asm/types.h>
 #include "usb.h"
 
 struct usb_hcd {
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index e749ae97180..8f01e80fd84 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 
diff --git a/drivers/usb/musb/am35x.h b/drivers/usb/musb/am35x.h
index 82ad94329cb..fd4383ad538 100644
--- a/drivers/usb/musb/am35x.h
+++ b/drivers/usb/musb/am35x.h
@@ -13,6 +13,7 @@
 #define __AM35X_USB_H__
 
 #include <asm/arch/am35x_def.h>
+#include <asm/types.h>
 #include "musb_core.h"
 
 /* Base address of musb wrapper */
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 147b2eb929f..ae174d1c394 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 #include "musb_core.h"
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index e5d8ac70288..167ab23bc5d 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -11,6 +11,7 @@
 
 #include <usb_defs.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #define MUSB_EP0_FIFOSIZE	64	/* This is non-configurable */
 
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 8942ed31fc4..2f7849d36f8 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -9,7 +9,9 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <usb.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index 56a92cc613a..e0714b6d873 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 <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <usb/udc.h>
diff --git a/drivers/usb/musb/omap3.c b/drivers/usb/musb/omap3.c
index 080bd78523c..2e824ff31f0 100644
--- a/drivers/usb/musb/omap3.c
+++ b/drivers/usb/musb/omap3.c
@@ -20,6 +20,7 @@
 #include <asm/omap_common.h>
 #include <twl4030.h>
 #include <twl6030.h>
+#include <asm/types.h>
 #include "omap3.h"
 
 static int platform_needs_initialization = 1;
diff --git a/drivers/usb/musb/omap3.h b/drivers/usb/musb/omap3.h
index 78fdb2959bb..0adbef29848 100644
--- a/drivers/usb/musb/omap3.h
+++ b/drivers/usb/musb/omap3.h
@@ -18,6 +18,7 @@
 #define _MUSB_OMAP3_H_
 
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 #include "musb_core.h"
 
 /* Base address of MUSB registers */
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
index be733f39b23..8d0bc8cb9db 100644
--- a/drivers/usb/phy/omap_usb_phy.c
+++ b/drivers/usb/phy/omap_usb_phy.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <usb.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index d1d92ddfe7a..2951da46abb 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <hang.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/usb/phy/twl4030.c b/drivers/usb/phy/twl4030.c
index 9bea192fccf..db8321459c2 100644
--- a/drivers/usb/phy/twl4030.c
+++ b/drivers/usb/phy/twl4030.c
@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 #include <twl4030.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 /* Defines for bits in registers */
diff --git a/drivers/usb/ulpi/omap-ulpi-viewport.c b/drivers/usb/ulpi/omap-ulpi-viewport.c
index 8b930e3fa91..0024347c6de 100644
--- a/drivers/usb/ulpi/omap-ulpi-viewport.c
+++ b/drivers/usb/ulpi/omap-ulpi-viewport.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <usb/ulpi.h>
 
diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c
index 5a7f034da1d..85f5c7ddf5c 100644
--- a/drivers/usb/ulpi/ulpi-viewport.c
+++ b/drivers/usb/ulpi/ulpi-viewport.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 #include <usb/ulpi.h>
 
 /* ULPI viewport control bits */
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c
index d5045a17959..ecf2b016bf5 100644
--- a/drivers/usb/ulpi/ulpi.c
+++ b/drivers/usb/ulpi/ulpi.c
@@ -23,6 +23,7 @@
 #include <exports.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <usb/ulpi.h>
 
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index 1e96f5bd35d..604ee99f83d 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -8,6 +8,8 @@
  * Wolfgang Denk's LCD-Framework (CONFIG_LCD, common/lcd.c)
  *
  * - supporting 16/24/32bit RGB/TFT raster Mode (not using palette)
+#include <stdbool.h>
+#include <linux/types.h>
  * - sets up LCD controller as in 'am335x_lcdpanel' struct given
  * - starts output DMA from gd->fb_base buffer
  */
diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c
index 648564bc3e1..30800282b0c 100644
--- a/drivers/video/anx9804.c
+++ b/drivers/video/anx9804.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include "anx98xx-edp.h"
 #include "anx9804.h"
diff --git a/drivers/video/anx9804.h b/drivers/video/anx9804.h
index c0fe3b393b4..252a280ce87 100644
--- a/drivers/video/anx9804.h
+++ b/drivers/video/anx9804.h
@@ -12,6 +12,7 @@
 #ifndef _ANX9804_H
 #define _ANX9804_H
 
+#include <asm/types.h>
 #define ANX9804_DATA_RATE_1620M				0x06
 #define ANX9804_DATA_RATE_2700M				0x0a
 
diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index acee5ae3535..d235fce538c 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
diff --git a/drivers/video/ati_radeon_fb.h b/drivers/video/ati_radeon_fb.h
index dde2067ef2e..a0e1fe5195d 100644
--- a/drivers/video/ati_radeon_fb.h
+++ b/drivers/video/ati_radeon_fb.h
@@ -9,6 +9,7 @@
  * Chip families. Must fit in the low 16 bits of a long word
  */
 #include <stdio.h>
+#include <asm/types.h>
 enum radeon_family {
 	CHIP_FAMILY_UNKNOW,
 	CHIP_FAMILY_LEGACY,
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 1891ec0117a..2860fffba2a 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -25,6 +25,7 @@
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.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 c734a44ba80..fb368dde615 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -22,6 +22,7 @@
 #include <atmel_lcdc.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index c949246a987..f2647fb3061 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -12,6 +12,7 @@
 #include <asm/cache.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static int bcm2835_video_probe(struct udevice *dev)
 {
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index e7c33e6a18b..a51c0365bf9 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 b6f3e300f35..f71d4f19171 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 960f9384042..95c2d2bc1d0 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <stdbool.h>
 #include <video_bridge.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index 430e4fd7da1..ca566cc5060 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vbe.h>
@@ -26,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "i915_reg.h"
 
 struct broadwell_igd_priv {
diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
index 8f9b607099e..8e6a5373cdb 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 vu_char  *vcxk_bws      = ((vu_char *) (CONFIG_SYS_VCXK_BASE));
 vu_short *vcxk_bws_word = ((vu_short *)(CONFIG_SYS_VCXK_BASE));
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index db64e18d13b..2265583713f 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -30,6 +30,8 @@
  * VIDEO_HW_RECTFILL	      - graphic driver supports hardware rectangle fill
  * VIDEO_HW_BITBLT	      - graphic driver supports hardware bit blt
  *
+#include <compiler.h>
+#include <stdbool.h>
  * Console Parameters are set by graphic drivers global struct:
  *
  * VIDEO_VISIBLE_COLS	      - x resolution
diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c
index 5b51252aaa6..700a18c252c 100644
--- a/drivers/video/console_normal.c
+++ b/drivers/video/console_normal.c
@@ -13,6 +13,7 @@
 #include <video_console.h>
 #include <video_font.h>		/* Get font data, width and height */
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int console_normal_set_row(struct udevice *dev, uint row, int clr)
 {
diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c
index 3649bd4487e..d43adbeaaf4 100644
--- a/drivers/video/console_rotate.c
+++ b/drivers/video/console_rotate.c
@@ -11,6 +11,7 @@
 #include <video_console.h>
 #include <video_font.h>		/* Get font data, width and height */
 #include <linux/errno.h>
+#include <linux/types.h>
 
 static int console_set_row_1(struct udevice *dev, uint row, int clr)
 {
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 01fcc03456b..187d3b06d2c 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Functions needed by stb_truetype.h */
 static int tt_floor(double val)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index d9909e17867..6f303af3708 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -24,6 +24,7 @@
 #include <linux/list.h>
 #include <linux/fb.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c
index 8b9131590fe..a54f12c0a98 100644
--- a/drivers/video/display-uclass.c
+++ b/drivers/video/display-uclass.c
@@ -9,6 +9,7 @@
 #include <edid.h>
 #include <errno.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 int display_read_edid(struct udevice *dev, u8 *buf, int buf_size)
diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c
index 3f61c5ef02b..24e397f1317 100644
--- a/drivers/video/dw_hdmi.c
+++ b/drivers/video/dw_hdmi.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <stdbool.h>
 #include <time.h>
 #include <asm/io.h>
 #include <i2c.h>
@@ -15,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 343732e2be0..2e4bde28dcb 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -11,10 +11,12 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dsi_host.h>
 #include <dm.h>
 #include <errno.h>
 #include <panel.h>
+#include <stdbool.h>
 #include <video.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
@@ -27,6 +29,7 @@
 #include <video_bridge.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define HWVER_131			0x31333100	/* IP version 1.31 */
 
diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index aa67cf17ad0..34478f5b2bf 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <vbe.h>
 #include <video.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 struct pixel {
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 72333b47010..77b81143f03 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <stdio.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index c87e18f1dad..b86624ba2c8 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.h b/drivers/video/exynos/exynos_dp_lowlevel.h
index c3d3aec7822..04a1af857b1 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.h
+++ b/drivers/video/exynos/exynos_dp_lowlevel.h
@@ -8,6 +8,7 @@
 #ifndef _EXYNOS_EDP_LOWLEVEL_H
 #define _EXYNOS_EDP_LOWLEVEL_H
 
+#include <asm/types.h>
 void exynos_dp_enable_video_bist(struct exynos_dp *dp_regs,
 				 unsigned int enable);
 void exynos_dp_enable_video_mute(struct exynos_dp *dp_regs,
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index a266b78b24a..8ecbbadb6a5 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -31,6 +31,7 @@
 #include <asm/arch/system.h>
 #include <asm/gpio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c
index cf284dc2470..be4ff0c286f 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <lcd.h>
 #include <log.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/arch/dsim.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
index d7a8db62fa9..0ac3c92130e 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
@@ -12,6 +12,7 @@
 #include <asm/arch/mipi_dsim.h>
 #include <asm/arch/power.h>
 #include <asm/arch/cpu.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include "exynos_mipi_dsi_lowlevel.h"
diff --git a/drivers/video/formike.c b/drivers/video/formike.c
index 14c39b65f5c..bc332dc7205 100644
--- a/drivers/video/formike.c
+++ b/drivers/video/formike.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <spi.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #define TAG_READ	0x80
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index fc4d42d40e9..8818522cb9e 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -23,6 +23,7 @@
 #include <video_fb.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "videomodes.h"
 
 /* Convert the X,Y resolution pair into a single number */
diff --git a/drivers/video/fsl_diu_fb.c b/drivers/video/fsl_diu_fb.c
index 068fc449f1c..4a1c9e41246 100644
--- a/drivers/video/fsl_diu_fb.c
+++ b/drivers/video/fsl_diu_fb.c
@@ -15,6 +15,7 @@
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "videomodes.h"
 #include <video_fb.h>
diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c
index 284c6527474..bb4fa7629b4 100644
--- a/drivers/video/hitachi_tx18d42vm_lcd.c
+++ b/drivers/video/hitachi_tx18d42vm_lcd.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c
index 5b1413699f9..9167be22948 100644
--- a/drivers/video/ihs_video_out.c
+++ b/drivers/video/ihs_video_out.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const uint MAX_X_CHARS = 53;
 static const uint MAX_Y_CHARS = 26;
diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c
index 2d5f47ff4ad..79dace25948 100644
--- a/drivers/video/imx/ipu_common.c
+++ b/drivers/video/imx/ipu_common.c
@@ -13,6 +13,7 @@
 /* #define DEBUG */
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/delay.h>
 #include <linux/string.h>
diff --git a/drivers/video/imx/ipu_regs.h b/drivers/video/imx/ipu_regs.h
index 1e29f66e67b..b97826b3a17 100644
--- a/drivers/video/imx/ipu_regs.h
+++ b/drivers/video/imx/ipu_regs.h
@@ -14,6 +14,7 @@
 #define __IPU_REGS_INCLUDED__
 
 #include <stdio.h>
+#include <asm/types.h>
 #define IPU_DISP0_BASE		0x00000000
 #define IPU_MCU_T_DEFAULT	8
 #define IPU_DISP1_BASE		(IPU_MCU_T_DEFAULT << 25)
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index e6838a7c7e6..49967704260 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -25,6 +25,7 @@
 #include <asm/mach-imx/video.h>
 #include <malloc.h>
 #include <video_fb.h>
+#include <linux/types.h>
 #include "../videomodes.h"
 #include "ipu.h"
 #include "mxcfb.h"
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index 40a8cd1fa59..a6babd169b8 100644
--- a/drivers/video/ivybridge_igd.c
+++ b/drivers/video/ivybridge_igd.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index b47756bb13d..f9e7e914c05 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <dm/read.h>
 #include <dm/uclass-internal.h>
 #include <errno.h>
diff --git a/drivers/video/logicore_dp_tx.c b/drivers/video/logicore_dp_tx.c
index fe806fd7e56..22dc8b1dc19 100644
--- a/drivers/video/logicore_dp_tx.c
+++ b/drivers/video/logicore_dp_tx.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/drivers/video/logicore_dp_tx.h b/drivers/video/logicore_dp_tx.h
index b760cad12cc..45c449a4860 100644
--- a/drivers/video/logicore_dp_tx.h
+++ b/drivers/video/logicore_dp_tx.h
@@ -12,6 +12,7 @@
 #define __GDSYS_LOGICORE_DP_TX_H__
 
 /*
+#include <asm/types.h>
  * struct logicore_dp_tx_msa - Main Stream Attributes (MSA)
  * @pixel_clock_hz:            The pixel clock of the stream (in Hz)
  * @bits_per_color:            Number of bits per color component
diff --git a/drivers/video/logicore_dp_tx_regif.h b/drivers/video/logicore_dp_tx_regif.h
index e1affd2b67a..e3b7f5b1c4c 100644
--- a/drivers/video/logicore_dp_tx_regif.h
+++ b/drivers/video/logicore_dp_tx_regif.h
@@ -12,6 +12,7 @@
 #ifndef __GDSYS_LOGICORE_DP_TX_REGIF_H__
 #define __GDSYS_LOGICORE_DP_TX_REGIF_H__
 
+#include <asm/types.h>
 enum {
 	/* link configuration field */
 	REG_LINK_BW_SET =		0x000,
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 1b58b355264..7006564ead5 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -25,6 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MALIDP_CORE_ID		0x0018
 #define MALIDP_REG_BG_COLOR	0x0044
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index 8b736f9e737..b45e4b199ef 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/drivers/video/meson/meson_canvas.c b/drivers/video/meson/meson_canvas.c
index eccac2f8f24..2ab288f08df 100644
--- a/drivers/video/meson/meson_canvas.c
+++ b/drivers/video/meson/meson_canvas.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #include "meson_vpu.h"
 
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index 6a2b439afb6..46db20bed3d 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -5,10 +5,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
 #include <log.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <dw_hdmi.h>
 #include <dm/device-internal.h>
@@ -17,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include <clk.h>
 #include <linux/delay.h>
diff --git a/drivers/video/meson/meson_plane.c b/drivers/video/meson/meson_plane.c
index 58dd5500ad6..22a5225d69a 100644
--- a/drivers/video/meson/meson_plane.c
+++ b/drivers/video/meson/meson_plane.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <stdbool.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/video/meson/meson_registers.h b/drivers/video/meson/meson_registers.h
index f6a5d1ac8ce..be17afd83c1 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 <asm/types.h>
 #include <linux/bitops.h>
 #define _REG(reg)	((reg) << 2)
 
diff --git a/drivers/video/meson/meson_vclk.c b/drivers/video/meson/meson_vclk.c
index dee5c90bd27..1eba4a08bb6 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 <stdbool.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
diff --git a/drivers/video/meson/meson_venc.c b/drivers/video/meson/meson_venc.c
index 166eaab4df1..d48120858e0 100644
--- a/drivers/video/meson/meson_venc.c
+++ b/drivers/video/meson/meson_venc.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "meson_vpu.h"
 
 enum {
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index 543eef8d205..acfcdbb4905 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <part.h>
+#include <stdbool.h>
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/errno.h>
diff --git a/drivers/video/meson/meson_vpu.h b/drivers/video/meson/meson_vpu.h
index 0a29e23093c..d3cbd2c3850 100644
--- a/drivers/video/meson/meson_vpu.h
+++ b/drivers/video/meson/meson_vpu.h
@@ -9,8 +9,10 @@
 #ifndef __MESON_VPU_H__
 #define __MESON_VPU_H__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <video.h>
+#include <asm/types.h>
 #include "meson_registers.h"
 
 struct display_timing;
diff --git a/drivers/video/meson/meson_vpu_init.c b/drivers/video/meson/meson_vpu_init.c
index 3f13c55ee28..5cace830742 100644
--- a/drivers/video/meson/meson_vpu_init.c
+++ b/drivers/video/meson/meson_vpu_init.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #include "meson_vpu.h"
 
diff --git a/drivers/video/mipi_dsi.c b/drivers/video/mipi_dsi.c
index 405db2ca49a..947c58351c4 100644
--- a/drivers/video/mipi_dsi.c
+++ b/drivers/video/mipi_dsi.c
@@ -42,6 +42,7 @@
 #include <dm/devres.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * DOC: dsi helpers
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index 22483f18299..4fdee74049c 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/types.h>
 
 #define MVEBU_LCD_WIN_CONTROL(w)	(0xf000 + ((w) << 4))
 #define MVEBU_LCD_WIN_BASE(w)		(0xf004 + ((w) << 4))
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index c0e0d1e5ea3..823257a74ed 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -14,6 +14,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.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 7a1fbed877a..48c1b4c4a3a 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <video_fb.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/video/nexell/s5pxx18_dp.c b/drivers/video/nexell/s5pxx18_dp.c
index e857b004d91..071dddfc46d 100644
--- a/drivers/video/nexell/s5pxx18_dp.c
+++ b/drivers/video/nexell/s5pxx18_dp.c
@@ -13,6 +13,7 @@
 #include <asm/arch/nexell.h>
 #include <asm/arch/display.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include "soc/s5pxx18_soc_disptop.h"
 #include "soc/s5pxx18_soc_dpc.h"
diff --git a/drivers/video/nexell/s5pxx18_dp_hdmi.c b/drivers/video/nexell/s5pxx18_dp_hdmi.c
index 087cb11f916..c388bce96fa 100644
--- a/drivers/video/nexell/s5pxx18_dp_hdmi.c
+++ b/drivers/video/nexell/s5pxx18_dp_hdmi.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <log.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/tieoff.h>
diff --git a/drivers/video/nexell/s5pxx18_dp_lvds.c b/drivers/video/nexell/s5pxx18_dp_lvds.c
index 72be625604b..a3ac95e6f4e 100644
--- a/drivers/video/nexell/s5pxx18_dp_lvds.c
+++ b/drivers/video/nexell/s5pxx18_dp_lvds.c
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/reset.h>
diff --git a/drivers/video/nexell/s5pxx18_dp_mipi.c b/drivers/video/nexell/s5pxx18_dp_mipi.c
index 2515add4fe7..7450d7ea556 100644
--- a/drivers/video/nexell/s5pxx18_dp_mipi.c
+++ b/drivers/video/nexell/s5pxx18_dp_mipi.c
@@ -5,11 +5,13 @@
  * Author: junghyun, kim <jhkim at nexell.co.kr>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/tieoff.h>
diff --git a/drivers/video/nexell/soc/s5pxx18_soc_lvds.h b/drivers/video/nexell/soc/s5pxx18_soc_lvds.h
index 08f8e5c406f..e891f7756f4 100644
--- a/drivers/video/nexell/soc/s5pxx18_soc_lvds.h
+++ b/drivers/video/nexell/soc/s5pxx18_soc_lvds.h
@@ -14,6 +14,7 @@
  * #define NUMBER_OF_LVDS_MODULE 1
  * #define PHY_BASEADDR_LVDS_MODULE	0xC010A000
  */
+#include <asm/types.h>
 #define	PHY_BASEADDR_LVDS_LIST	\
 		{ PHY_BASEADDR_LVDS_MODULE }
 
diff --git a/drivers/video/nexell/soc/s5pxx18_soc_mipi.h b/drivers/video/nexell/soc/s5pxx18_soc_mipi.h
index 63751ca83fb..56a9dc7f26c 100644
--- a/drivers/video/nexell/soc/s5pxx18_soc_mipi.h
+++ b/drivers/video/nexell/soc/s5pxx18_soc_mipi.h
@@ -8,6 +8,7 @@
 #ifndef _S5PXX18_SOC_MIPI_H_
 #define _S5PXX18_SOC_MIPI_H_
 
+#include <linux/types.h>
 #define NUMBER_OF_MIPI_MODULE 1
 #define PHY_BASEADDR_MIPI_MODULE	0xC00D0000
 #define	PHY_BASEADDR_MIPI_LIST	\
diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
index 1592e9b46ab..7df712d10d3 100644
--- a/drivers/video/nexell_display.c
+++ b/drivers/video/nexell_display.c
@@ -7,6 +7,7 @@
  * Copyright (C) 2020  Stefan Bosch <stefan_b at posteo.net>
  */
 
+#include <compiler.h>
 #include <config.h>
 #include <common.h>
 #include <command.h>
@@ -23,6 +24,7 @@
 #include <asm/arch/display.h>
 #include <asm/arch/display_dev.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "videomodes.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c
index 6efba122e78..0b98c31aa0d 100644
--- a/drivers/video/omap3_dss.c
+++ b/drivers/video/omap3_dss.c
@@ -29,6 +29,7 @@
 #include <asm/io.h>
 #include <asm/arch/dss.h>
 #include <video_fb.h>
+#include <asm/types.h>
 
 /* Configure VENC for a given Mode (NTSC / PAL) */
 void omap3_dss_venc_config(const struct venc_regs *venc_cfg,
diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c
index 8bff8e75cb8..41e483c3702 100644
--- a/drivers/video/orisetech_otm8009a.c
+++ b/drivers/video/orisetech_otm8009a.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 45b2bc17a7a..60052f77bc9 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 /**
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index 79981e99707..b13a7c7b0a7 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -11,6 +11,7 @@
 /************************************************************************/
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <stdio.h>
 #include <asm/arch/pxa-regs.h>
diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c
index 33852ec5b4c..95cc0a3183f 100644
--- a/drivers/video/raydium-rm68200.c
+++ b/drivers/video/raydium-rm68200.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 
 /*** Manufacturer Command Set ***/
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
index e1f7850040b..dba5821654c 100644
--- a/drivers/video/rockchip/rk3288_vop.c
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -18,6 +18,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "rk_vop.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
index db1fb8093d7..492f0c0efca 100644
--- a/drivers/video/rockchip/rk3399_vop.c
+++ b/drivers/video/rockchip/rk3399_vop.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "rk_vop.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 49fe635229d..45145d690b1 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <panel.h>
 #include <regmap.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <time.h>
@@ -27,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 f27cdf8ed4b..7607a447343 100644
--- a/drivers/video/rockchip/rk_hdmi.c
+++ b/drivers/video/rockchip/rk_hdmi.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/types.h>
 #include "rk_hdmi.h"
 #include "rk_vop.h" /* for rk_vop_probe_regulators */
 
diff --git a/drivers/video/rockchip/rk_hdmi.h b/drivers/video/rockchip/rk_hdmi.h
index 5767ef14437..82c0ada13b6 100644
--- a/drivers/video/rockchip/rk_hdmi.h
+++ b/drivers/video/rockchip/rk_hdmi.h
@@ -6,6 +6,7 @@
 #ifndef __RK_HDMI_H__
 #define __RK_HDMI_H__
 
+#include <asm/types.h>
 struct rkhdmi_driverdata {
 	/* configuration */
 	u8 i2c_clk_high;
diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index c9890feac0f..283905b8319 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
@@ -18,6 +19,7 @@
 #include <asm/arch-rockchip/grf_rk3288.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/lvds_rk3288.h>
+#include <asm/types.h>
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <dt-bindings/video/rk3288.h>
 #include <linux/errno.h>
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index 2438d44cf3f..cc4754ebbc1 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -13,6 +13,7 @@
 #include <regmap.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "rk_mipi.h"
 #include <syscon.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_mipi.h b/drivers/video/rockchip/rk_mipi.h
index 61920f23ad9..15cce849e52 100644
--- a/drivers/video/rockchip/rk_mipi.h
+++ b/drivers/video/rockchip/rk_mipi.h
@@ -7,6 +7,7 @@
 #ifndef __RK_MIPI_H
 #define __RK_MIPI_H
 
+#include <linux/types.h>
 struct rk_mipi_priv {
 	uintptr_t regs;
 	void *grf;
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index 41541ef8222..10122b37683 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -24,6 +24,7 @@
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <power/regulator.h>
 #include "rk_vop.h"
 
diff --git a/drivers/video/rockchip/rk_vop.h b/drivers/video/rockchip/rk_vop.h
index 8fa2f389390..1ee61fad43a 100644
--- a/drivers/video/rockchip/rk_vop.h
+++ b/drivers/video/rockchip/rk_vop.h
@@ -7,6 +7,7 @@
 #define __RK_VOP_H__
 
 #include <asm/arch-rockchip/vop_rk3288.h>
+#include <asm/types.h>
 
 struct rk_vop_priv {
 	void *grf;
diff --git a/drivers/video/sandbox_osd.c b/drivers/video/sandbox_osd.c
index ab6abae520e..079a13b4831 100644
--- a/drivers/video/sandbox_osd.c
+++ b/drivers/video/sandbox_osd.c
@@ -10,6 +10,7 @@
 #include <video_osd.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "sandbox_osd.h"
 
diff --git a/drivers/video/scf0403_lcd.c b/drivers/video/scf0403_lcd.c
index 0d5de4c4dda..55d0c5b2f28 100644
--- a/drivers/video/scf0403_lcd.c
+++ b/drivers/video/scf0403_lcd.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <asm/gpio.h>
 #include <spi.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/video/ssd2828.c b/drivers/video/ssd2828.c
index a620a579fd7..bea5618b770 100644
--- a/drivers/video/ssd2828.c
+++ b/drivers/video/ssd2828.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/video/stb_truetype.h b/drivers/video/stb_truetype.h
index 93518d200ff..02e8f8330ba 100644
--- a/drivers/video/stb_truetype.h
+++ b/drivers/video/stb_truetype.h
@@ -194,6 +194,7 @@
 // NOTES
 //
 //   The system uses the raw data found in the .ttf file without changing it
+#include <linux/types.h>
 //   and without building auxiliary data structures. This is a bit inefficient
 //   on little-endian systems (the data is big-endian), but assuming you're
 //   caching the bitmaps or glyph shapes this shouldn't be a big deal.
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index f58aa885f32..bc1e553006e 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <dm.h>
 #include <dsi_host.h>
 #include <log.h>
@@ -21,6 +22,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index a763f13fe15..27cc8c4b4a7 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <compiler.h>
 #include <display.h>
 #include <dm.h>
 #include <log.h>
@@ -23,6 +24,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct stm32_ltdc_priv {
 	void __iomem *regs;
diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c
index 8814bc36814..ab236ccbc6a 100644
--- a/drivers/video/sunxi/lcdc.c
+++ b/drivers/video/sunxi/lcdc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <log.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/arch/clock.h>
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index a5d85507057..9f2638a1025 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -26,6 +26,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.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 6c25910f67d..0f21cb01a1c 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <init.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <asm/u-boot.h>
@@ -17,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 b601328b6b3..b371bb8ce1f 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/types.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 841ef433493..63eec9fe88a 100644
--- a/drivers/video/sunxi/sunxi_lcd.c
+++ b/drivers/video/sunxi/sunxi_lcd.c
@@ -18,6 +18,7 @@
 #include <asm/arch/lcdc.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c
index bead13f2934..96861b953d9 100644
--- a/drivers/video/tda19988.c
+++ b/drivers/video/tda19988.c
@@ -10,6 +10,7 @@
 #include <display.h>
 #include <i2c.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 2bacfa86dad..bce50d49bf7 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -17,6 +17,7 @@
 #include <asm/system.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index bb2f46be558..0926a385c2b 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -27,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "displayport.h"
 
 /* return in 1000ths of a Hertz */
diff --git a/drivers/video/tegra124/displayport.h b/drivers/video/tegra124/displayport.h
index a3044475aeb..f87929f8162 100644
--- a/drivers/video/tegra124/displayport.h
+++ b/drivers/video/tegra124/displayport.h
@@ -6,6 +6,7 @@
 #ifndef _TEGRA_DISPLAYPORT_H
 #define _TEGRA_DISPLAYPORT_H
 
+#include <asm/types.h>
 #include <linux/drm_dp_helper.h>
 
 struct dpaux_ctlr {
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index ed1f9022bab..c6f7d564e6e 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <errno.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <video_bridge.h>
@@ -19,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 17a1f75a9bf..6ae98651cb5 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <panel.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <syscon.h>
 #include <time.h>
@@ -19,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "displayport.h"
 #include "sor.h"
 #include <linux/err.h>
diff --git a/drivers/video/tegra124/sor.h b/drivers/video/tegra124/sor.h
index 2fc9a38267d..4ae14ecba31 100644
--- a/drivers/video/tegra124/sor.h
+++ b/drivers/video/tegra124/sor.h
@@ -6,6 +6,7 @@
 #ifndef _VIDEO_TEGRA124_SOR_H
 #define _VIDEO_TEGRA124_SOR_H
 
+#include <asm/types.h>
 #define SUPER_STATE0					0x1
 #define SUPER_STATE0_UPDATE_SHIFT			0
 #define SUPER_STATE0_UPDATE_DEFAULT_MASK		0x1
diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c
index 9656326bdb1..a466151a85e 100644
--- a/drivers/video/vesa.c
+++ b/drivers/video/vesa.c
@@ -10,6 +10,7 @@
 #include <vbe.h>
 #include <video.h>
 #include <asm/mtrr.h>
+#include <linux/types.h>
 
 static int vesa_video_probe(struct udevice *dev)
 {
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 204828d594a..e37adf3f128 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Structure to describe a console color
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index dcbe2480084..24a68156022 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdio_dev.h>
 #include <time.h>
@@ -27,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Theory of operation:
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index c83f41631b6..86280235a74 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -5,16 +5,19 @@
 
 #include <common.h>
 #include <bmp_layout.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <mapmem.h>
 #include <splash.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <video.h>
 #include <watchdog.h>
 #include <asm/unaligned.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_VIDEO_BMP_RLE8
 #define BMP_RLE8_ESCAPE		0
diff --git a/drivers/video/video_osd-uclass.c b/drivers/video/video_osd-uclass.c
index 82136a292bf..9ac3fe6c385 100644
--- a/drivers/video/video_osd-uclass.c
+++ b/drivers/video/video_osd-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <video_osd.h>
+#include <linux/types.h>
 
 int video_osd_get_info(struct udevice *dev, struct video_osd_info *info)
 {
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index da0945b5c60..6bb044fa72b 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -22,6 +22,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 #include <dm/lists.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
diff --git a/drivers/virtio/virtio_blk.c b/drivers/virtio/virtio_blk.c
index 5117b925126..ac55e546de3 100644
--- a/drivers/virtio/virtio_blk.c
+++ b/drivers/virtio/virtio_blk.c
@@ -13,6 +13,7 @@
 #include <virtio_ring.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include "virtio_blk.h"
 
 struct virtio_blk_priv {
diff --git a/drivers/virtio/virtio_blk.h b/drivers/virtio/virtio_blk.h
index 8d8e02fa2ea..700f42a543e 100644
--- a/drivers/virtio/virtio_blk.h
+++ b/drivers/virtio/virtio_blk.h
@@ -10,6 +10,7 @@
 #define _LINUX_VIRTIO_BLK_H
 
 /* Feature bits */
+#include <compiler.h>
 #define VIRTIO_BLK_F_SIZE_MAX	1	/* Indicates maximum segment size */
 #define VIRTIO_BLK_F_SEG_MAX	2	/* Indicates maximum # of segments */
 #define VIRTIO_BLK_F_GEOMETRY	4	/* Legacy geometry available */
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 42baf5c9fd2..a824de57987 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <virtio_types.h>
@@ -19,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "virtio_mmio.h"
 
 static int virtio_mmio_get_config(struct udevice *udev, unsigned int offset,
diff --git a/drivers/virtio/virtio_mmio.h b/drivers/virtio/virtio_mmio.h
index b446674ccce..bada3353573 100644
--- a/drivers/virtio/virtio_mmio.h
+++ b/drivers/virtio/virtio_mmio.h
@@ -12,6 +12,8 @@
 /* Control registers */
 
 /* Magic value ("virt" string) - Read Only */
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 #define VIRTIO_MMIO_MAGIC_VALUE		0x000
 
diff --git a/drivers/virtio/virtio_net.c b/drivers/virtio/virtio_net.c
index d20ea6325f4..8e03fb396a8 100644
--- a/drivers/virtio/virtio_net.c
+++ b/drivers/virtio/virtio_net.c
@@ -7,12 +7,14 @@
 #include <common.h>
 #include <dm.h>
 #include <net.h>
+#include <stdbool.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "virtio_net.h"
 
 /* Amount of buffers to keep in the RX virtqueue */
diff --git a/drivers/virtio/virtio_net.h b/drivers/virtio/virtio_net.h
index c92bae52690..07001d8c933 100644
--- a/drivers/virtio/virtio_net.h
+++ b/drivers/virtio/virtio_net.h
@@ -10,6 +10,7 @@
 #define _LINUX_VIRTIO_NET_H
 
 /* TODO: needs to be removed! */
+#include <compiler.h>
 #define ETH_ALEN				6
 
 /* The feature bitmap for virtio net */
diff --git a/drivers/virtio/virtio_pci.h b/drivers/virtio/virtio_pci.h
index cc753ed7b3d..e7952046884 100644
--- a/drivers/virtio/virtio_pci.h
+++ b/drivers/virtio/virtio_pci.h
@@ -69,6 +69,7 @@
 #endif /* VIRTIO_PCI_NO_LEGACY */
 
 /* The bit of the ISR which indicates a device configuration change */
+#include <linux/types.h>
 #define VIRTIO_PCI_ISR_CONFIG		0x2
 /* Vector value used to disable MSI for queue */
 #define VIRTIO_MSI_NO_VECTOR		0xffff
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index bef5dd1ca3c..a92068b795d 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <stdio.h>
@@ -20,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 #include "virtio_pci.h"
 
 #define VIRTIO_PCI_DRV_NAME	"virtio-pci.l"
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 9edb271e929..1ebb7f2e899 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <stdio.h>
@@ -22,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "virtio_pci.h"
 
 #define VIRTIO_PCI_DRV_NAME	"virtio-pci.m"
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index a5dbb0dd7f8..97893f49a5c 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -19,6 +19,7 @@
 #include <linux/compat.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int virtqueue_add(struct virtqueue *vq, struct virtio_sg *sgs[],
 		  unsigned int out_sgs, unsigned int in_sgs)
diff --git a/drivers/virtio/virtio_rng.c b/drivers/virtio/virtio_rng.c
index dadaaa449ce..0d39ea057c1 100644
--- a/drivers/virtio/virtio_rng.c
+++ b/drivers/virtio/virtio_rng.c
@@ -12,6 +12,7 @@
 #include <virtio_ring.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define BUFFER_SIZE	16UL
 
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c
index 8fb04b8b39e..4c6c8653e74 100644
--- a/drivers/virtio/virtio_sandbox.c
+++ b/drivers/virtio/virtio_sandbox.c
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 struct virtio_sandbox_priv {
 	u8 id;
diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c
index 0967accdf00..23e7a573f5d 100644
--- a/drivers/w1-eeprom/ds24xxx.c
+++ b/drivers/w1-eeprom/ds24xxx.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <dm.h>
 #include <w1-eeprom.h>
diff --git a/drivers/w1-eeprom/ds2502.c b/drivers/w1-eeprom/ds2502.c
index 167351055af..c1f2055681e 100644
--- a/drivers/w1-eeprom/ds2502.c
+++ b/drivers/w1-eeprom/ds2502.c
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <w1-eeprom.h>
diff --git a/drivers/w1-eeprom/eep_sandbox.c b/drivers/w1-eeprom/eep_sandbox.c
index 86c02b9b915..53a46a58d51 100644
--- a/drivers/w1-eeprom/eep_sandbox.c
+++ b/drivers/w1-eeprom/eep_sandbox.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/err.h>
 #include <dm.h>
 #include <w1-eeprom.h>
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 07e1c12e5ce..85cf10637f6 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <w1.h>
 #include <w1-eeprom.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #include <dm/device-internal.h>
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 44047ea2bfe..949d9535c45 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -21,6 +21,7 @@
 #include <asm/arch/clock.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c
index b54f169adfb..ada30f18143 100644
--- a/drivers/w1/w1-gpio.c
+++ b/drivers/w1/w1-gpio.c
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <w1.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 
 #include <asm/gpio.h>
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index 9b9913a90d0..d94408234b3 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <w1.h>
 #include <w1-eeprom.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #include <dm/device-internal.h>
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c
index b845e2b2e3d..e27e0c02711 100644
--- a/drivers/watchdog/armada-37xx-wdt.c
+++ b/drivers/watchdog/armada-37xx-wdt.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <wdt.h>
 #include <asm/global_data.h>
@@ -14,6 +15,7 @@
 #include <asm/arch/soc.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 0f858b181c3..b483ba05c30 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -12,6 +12,7 @@
 #include <asm/arch/wdt.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define WDT_AST2500	2500
 #define WDT_AST2400	2400
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index ad602a8eb34..02d020cdaab 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -26,6 +26,7 @@
 #include <wdt.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index 5999561efd2..ffdd29204ff 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -8,12 +8,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <log.h>
 #include <wdt.h>
 #include <clk.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* WDT Value register */
 #define WDT_VAL_REG		0x0
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index a7f9095e2cd..34b26822e95 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <wdt.h>
 #include <clk.h>
 #include <div64.h>
@@ -16,6 +17,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct cdns_regs {
 	u32 zmr;	/* WD Zero mode register, offset - 0x0 */
diff --git a/drivers/watchdog/cortina_wdt.c b/drivers/watchdog/cortina_wdt.c
index 0f60b3a6322..a362a5c020d 100644
--- a/drivers/watchdog/cortina_wdt.c
+++ b/drivers/watchdog/cortina_wdt.c
@@ -5,12 +5,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <asm/io.h>
 #include <wdt.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #define CA_WDT_CTRL		0x00
 #define CA_WDT_PS		0x04
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 06783650bed..5a3ae6001c3 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -5,6 +5,7 @@
 
 #include <clk.h>
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <reset.h>
 #include <wdt.h>
@@ -13,6 +14,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define DW_WDT_CR	0x00
 #define DW_WDT_TORR	0x04
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index d36b8b14931..444796a6e2c 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
+#include <stdbool.h>
 #include <asm/io.h>
 #include <wdt.h>
 #include <watchdog.h>
@@ -19,6 +21,7 @@
 #include <div64.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define TIMEOUT_MAX	128000
 #define TIMEOUT_MIN	500
diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c
index d2277356cc4..9db1cab6db5 100644
--- a/drivers/watchdog/mpc8xx_wdt.c
+++ b/drivers/watchdog/mpc8xx_wdt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <dm.h>
 #include <wdt.h>
@@ -12,6 +13,7 @@
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 void hw_watchdog_reset(void)
 {
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index d033d95b6f5..f90373bdcaa 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -10,12 +10,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <wdt.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 2a38bef43ec..41bd000a092 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -7,12 +7,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <hang.h>
 #include <wdt.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.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 9d3896a5d99..8da65d78464 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -47,6 +47,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /* Hardware timeout in seconds */
 #define WDT_HW_TIMEOUT 60
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 804a7681107..4ec584dcf00 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -13,9 +13,11 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <clk.h>
 #include <log.h>
+#include <stdbool.h>
 #include <wdt.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
@@ -24,6 +26,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/sandbox_wdt.c b/drivers/watchdog/sandbox_wdt.c
index e05d82789f6..729f59dcc38 100644
--- a/drivers/watchdog/sandbox_wdt.c
+++ b/drivers/watchdog/sandbox_wdt.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <wdt.h>
 #include <asm/state.h>
+#include <linux/types.h>
 
 static int sandbox_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
 {
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 1e44df1da29..cc3fbfceada 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -5,6 +5,7 @@
  * Copyright 2020 NXP
  */
 
+#include <compiler.h>
 #include <time.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -16,6 +17,7 @@
 #include <linux/err.h>
 #include <watchdog.h>
 #include <wdt.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 0eea0ab388e..aee2fe7ad27 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -5,6 +5,7 @@
  * Copyright 2019 NXP
  */
 
+#include <compiler.h>
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -17,6 +18,7 @@
 #include <watchdog.h>
 #include <wdt.h>
 #include <linux/err.h>
+#include <linux/types.h>
 
 #define WDTLOAD			0x000
 #define WDTCONTROL		0x008
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index c45dbdc9bdb..cb103988b62 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/iopoll.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 /* IWDG registers */
 #define IWDG_KR		0x00	/* Key register */
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index 050e97f392a..59ec86864d8 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -9,6 +9,7 @@
 #include <div64.h>
 #include <asm/scu.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Hardware timeout in seconds */
 #define WDT_PRETIMEOUT		15
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index 7533fc612c7..8630f43ed62 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/types.h>
 
 /*
  * MX7ULP WDOG Register Map
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index e2791a0dba0..0b5dca24851 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -15,6 +15,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index 5047cd04561..a5dd4092ea2 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -11,10 +11,12 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <stdbool.h>
 #include <wdt.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 #define XWT_CSR0_WRS_MASK	0x00000008 /* Reset status Mask */
 #define XWT_CSR0_WDS_MASK	0x00000004 /* Timer state Mask */
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index b688ebf0938..0c8211cebf4 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -17,6 +17,7 @@
 #include <linux/compat.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/types.h>
 
 /* Refresh Register Masks */
 #define XWT_WWREF_GWRR_MASK	BIT(0) /* Refresh and start new period */
diff --git a/env/common.c b/env/common.c
index 7b0a7b38e24..14dc646af77 100644
--- a/env/common.c
+++ b/env/common.c
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/eeprom.c b/env/eeprom.c
index ba168014e24..71c70ed826d 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -14,6 +14,7 @@
 #include <env_internal.h>
 #include <asm/global_data.h>
 #include <linux/stddef.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #if defined(CONFIG_I2C_ENV_EEPROM_BUS)
 #include <i2c.h>
diff --git a/env/env.c b/env/env.c
index e1a36b658fc..569cba36974 100644
--- a/env/env.c
+++ b/env/env.c
@@ -5,15 +5,18 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <env_internal.h>
 #include <log.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/env/ext4.c b/env/ext4.c
index 59ed02c0ca1..6dd77d78413 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -19,10 +19,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <part.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/fat.c b/env/fat.c
index c4c09fee02b..b65ecee620c 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <env.h>
 #include <env_internal.h>
 #include <part.h>
@@ -22,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/stddef.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SPL_BUILD
 /* TODO(sjg at chromium.org): Figure out why this is needed */
diff --git a/env/flags.c b/env/flags.c
index 8cd03336a3f..feaddce9536 100644
--- a/env/flags.c
+++ b/env/flags.c
@@ -5,6 +5,7 @@
  */
 
 #include <env.h>
+#include <stdbool.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
diff --git a/env/flash.c b/env/flash.c
index 7e355d22726..a8ee4c31616 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -22,6 +22,7 @@
 #include <search.h>
 #include <errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/mmc.c b/env/mmc.c
index d6a6f48ef81..a6ba52554ff 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -6,12 +6,14 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/nand.c b/env/nand.c
index 18d43c0503a..5f42b38cc7e 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -27,6 +27,7 @@
 #include <nand.h>
 #include <search.h>
 #include <errno.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \
diff --git a/env/nowhere.c b/env/nowhere.c
index 23028661084..600e648f935 100644
--- a/env/nowhere.c
+++ b/env/nowhere.c
@@ -13,6 +13,7 @@
 #include <env_internal.h>
 #include <asm/global_data.h>
 #include <linux/stddef.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/env/nvram.c b/env/nvram.c
index 7af5c4cf4b8..3d7b7fe1524 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -32,6 +32,7 @@
 #include <search.h>
 #include <errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/onenand.c b/env/onenand.c
index 8ef4ca7535e..4782d70fd91 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -17,6 +17,7 @@
 #include <search.h>
 #include <errno.h>
 #include <onenand_uboot.h>
+#include <linux/types.h>
 
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
diff --git a/env/remote.c b/env/remote.c
index 0d026176794..2557a046b39 100644
--- a/env/remote.c
+++ b/env/remote.c
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/stddef.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #ifdef ENV_IS_EMBEDDED
diff --git a/env/sata.c b/env/sata.c
index a4af49ed8e2..367a686865b 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -6,9 +6,11 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <compiler.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/sf.c b/env/sf.c
index 6f874f43986..522baec7e27 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -9,6 +9,7 @@
  * (C) Copyright 2008 Atmel Corporation
  */
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
@@ -25,6 +26,7 @@
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #ifndef CONFIG_SPL_BUILD
diff --git a/examples/api/glue.c b/examples/api/glue.c
index c90765e8d28..aa287e8832f 100644
--- a/examples/api/glue.c
+++ b/examples/api/glue.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <env.h>
 #include <linux/string.h>
 #include <linux/types.h>
diff --git a/examples/api/glue.h b/examples/api/glue.h
index f9745604b6c..37ed9d30878 100644
--- a/examples/api/glue.h
+++ b/examples/api/glue.h
@@ -12,6 +12,7 @@
 #ifndef _API_GLUE_H_
 #define _API_GLUE_H_
 
+#include <linux/types.h>
 #define API_SEARCH_LEN		(3 * 1024 * 1024)	/* 3MB search range */
 
 #define UB_MAX_MR	5	/* max mem regions number */
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index 9e4e883d9d2..62ef34a0ce5 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define CMD_ID    0x9f
 #define CMD_STAT  0xd7
diff --git a/examples/standalone/sched.c b/examples/standalone/sched.c
index 0d734e7c9df..d58509e095a 100644
--- a/examples/standalone/sched.c
+++ b/examples/standalone/sched.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <exports.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*
  * Author: Arun Dharankar <ADharankar at ATTBI.Com>
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index 9b9f9b5ffa3..6a8adfb7936 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <uuid.h>
 #include <linux/errno.h>
+#include <linux/kernel.h>
 #include <linux/time.h>
 
 struct btrfs_info btrfs_info;
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h
index 25a8cf6a879..0bfd8dca93c 100644
--- a/fs/btrfs/btrfs.h
+++ b/fs/btrfs/btrfs.h
@@ -9,6 +9,7 @@
 #define __BTRFS_BTRFS_H__
 
 #include <linux/rbtree.h>
+#include <linux/types.h>
 #include "conv-funcs.h"
 
 struct btrfs_info {
diff --git a/fs/btrfs/btrfs_tree.h b/fs/btrfs/btrfs_tree.h
index aa0f3d6c86d..4d70ef3af64 100644
--- a/fs/btrfs/btrfs_tree.h
+++ b/fs/btrfs/btrfs_tree.h
@@ -7,6 +7,7 @@
 #define __BTRFS_BTRFS_TREE_H__
 
 #include <common.h>
+#include <compiler.h>
 
 #define BTRFS_VOL_NAME_MAX 255
 #define BTRFS_NAME_MAX 255
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 65c152a52fc..3c164c902e8 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <compiler.h>
+#include <asm/types.h>
 #include "btrfs_tree.h"
 
 #define BTRFS_MAGIC 0x4D5F53665248425FULL /* ascii _BHRfS_M, no null */
diff --git a/fs/btrfs/subvolume.c b/fs/btrfs/subvolume.c
index bc488183cd3..51fe7f9d8a9 100644
--- a/fs/btrfs/subvolume.c
+++ b/fs/btrfs/subvolume.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <linux/kernel.h>
+
 static int get_subvol_name(u64 subvolid, char *name, int max_len)
 {
 	struct btrfs_root_ref rref;
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 41f2193d51c..e50ddfcba97 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -13,6 +13,7 @@
 #include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "btrfs.h"
 
 #define BTRFS_SUPER_FLAG_SUPP	(BTRFS_HEADER_FLAG_WRITTEN	\
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 3f489910180..524d8ed6cad 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -11,6 +11,7 @@
 #include <asm/byteorder.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* Offset of master header from the start of a coreboot ROM */
 #define MASTER_HDR_OFFSET	0x38
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 12fab86e470..76a929d7bc8 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -34,6 +34,7 @@
 #include <jffs2/load_kernel.h>
 #include <cramfs/cramfs_fs.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* These two macros may change in future, to provide better st_ino
    semantics. */
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 168443de1ff..71b42bddcb6 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -28,6 +28,7 @@
 #include <fs_internal.h>
 #include <ext4fs.h>
 #include <ext_common.h>
+#include <linux/types.h>
 #include "ext4_common.h"
 #include <log.h>
 
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 8d1cec27cb7..d8f2bb7bdad 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -34,6 +34,7 @@
 #include <linux/string.h>
 #include <linux/time.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 #include "ext4_common.h"
 
 struct ext2_data *ext4fs_root;
diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h
index 1314cf20df8..10167278558 100644
--- a/fs/ext4/ext4_common.h
+++ b/fs/ext4/ext4_common.h
@@ -30,6 +30,7 @@
 #include "crc16.h"
 #endif
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define YES		1
 #define NO		0
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index ad967d39f95..75b54902c24 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -5,6 +5,7 @@
  * Uma Shankar <uma.shankar at samsung.com>
  * Manjunatha C Achar <a.manjunatha at samsung.com>
  *
+#include <linux/types.h>
  * Journal data structures and headers for Journaling feature of ext4
  * have been referred from JBD2 (Journaling Block device 2)
  * implementation in Linux Kernel.
diff --git a/fs/ext4/ext4_journal.h b/fs/ext4/ext4_journal.h
index 8c974cff609..bc1cfc77d1a 100644
--- a/fs/ext4/ext4_journal.h
+++ b/fs/ext4/ext4_journal.h
@@ -5,6 +5,7 @@
  * Uma Shankar <uma.shankar at samsung.com>
  * Manjunatha C Achar <a.manjunatha at samsung.com>
  *
+#include <linux/types.h>
  * Journal data structures and headers for Journaling feature of ext4
  * have been referred from JBD2 (Journaling Block device 2)
  * implementation in Linux Kernel.
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 933e8b19b1b..e6d0d4372ad 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -27,12 +27,14 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <part.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/stat.h>
 #include <div64.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ext4_common.h"
 
 static inline void ext4fs_sb_free_inodes_inc(struct ext2_sblock *sb)
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 8143079b8b0..a4fa61803f6 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -31,6 +31,7 @@
 #include <uuid.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ext4_common.h"
 
 int ext4fs_symlinknest;
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index b68c378a703..95ed12ab045 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * Convert a string to lowercase.  Converts at most 'len' characters,
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 7da31936542..eee83fa5a6e 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/math64.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "fat.c"
 
 static void uppercase(char *str, int len)
diff --git a/fs/fs.c b/fs/fs.c
index a407714df3f..49fd8b5cd1c 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -17,6 +17,7 @@
 #include <fat.h>
 #include <fs.h>
 #include <sandboxfs.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <ubifs_uboot.h>
@@ -30,6 +31,7 @@
 #include <linux/math64.h>
 #include <efi_loader.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/fs/fs_internal.c b/fs/fs_internal.c
index b626ffaecbe..8f3aa8d4f05 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -12,6 +12,7 @@
 #include <part.h>
 #include <memalign.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 
diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c
index da9a17ecaf6..dfc2be41cc9 100644
--- a/fs/jffs2/compr_lzo.c
+++ b/fs/jffs2/compr_lzo.c
@@ -22,6 +22,7 @@
    Original copyright notice follows:
 
    lzo1x_9x.c -- implementation of the LZO1X-999 compression algorithm
+#include <linux/types.h>
    lzo_ptr.h -- low-level pointer constructs
    lzo_swd.ch -- sliding window dictionary
    lzoconf.h -- configuration for the LZO real-time data compression library
diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c
index 89b9f2f13eb..114880dee27 100644
--- a/fs/jffs2/compr_rtime.c
+++ b/fs/jffs2/compr_rtime.c
@@ -46,6 +46,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <jffs2/jffs2.h>
 
 void rtime_decompress(unsigned char *data_in, unsigned char *cpage_out,
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
index 9ff22177382..521ebe23e2f 100644
--- a/fs/jffs2/compr_rubin.c
+++ b/fs/jffs2/compr_rubin.c
@@ -39,6 +39,7 @@
  */
 
 #include <config.h>
+#include <asm/types.h>
 #include <jffs2/jffs2.h>
 #include <jffs2/compr_rubin.h>
 
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 40e8ff66377..34ec95f0304 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -122,6 +122,7 @@
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/time.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 #include <jffs2/jffs2.h>
diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h
index 65d19a76f97..3f5dcd514e0 100644
--- a/fs/jffs2/jffs2_private.h
+++ b/fs/jffs2/jffs2_private.h
@@ -1,6 +1,7 @@
 #ifndef jffs2_private_h
 #define jffs2_private_h
 
+#include <asm/types.h>
 #include <jffs2/jffs2.h>
 
 
diff --git a/fs/jffs2/summary.h b/fs/jffs2/summary.h
index 834933cd158..739fc7951e7 100644
--- a/fs/jffs2/summary.h
+++ b/fs/jffs2/summary.h
@@ -13,6 +13,7 @@
 #ifndef JFFS2_SUMMARY_H
 #define JFFS2_SUMMARY_H
 
+#include <linux/types.h>
 #define BLK_STATE_ALLFF		0
 #define BLK_STATE_CLEAN		1
 #define BLK_STATE_PARTDIRTY	2
diff --git a/fs/reiserfs/mode_string.c b/fs/reiserfs/mode_string.c
index 638cf6368da..bf223858d82 100644
--- a/fs/reiserfs/mode_string.c
+++ b/fs/reiserfs/mode_string.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <linux/stat.h>
+#include <linux/types.h>
 
 #if ( S_ISUID != 04000 ) || ( S_ISGID != 02000 ) || ( S_ISVTX != 01000 ) \
  || ( S_IRUSR != 00400 ) || ( S_IWUSR != 00200 ) || ( S_IXUSR != 00100 ) \
diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c
index 37068e295b3..37ec4bfbd39 100644
--- a/fs/reiserfs/reiserfs.c
+++ b/fs/reiserfs/reiserfs.c
@@ -11,6 +11,7 @@
  */
 
 /* An implementation for the ReiserFS filesystem ported from GRUB.
+#include <linux/types.h>
  * Some parts of this code (mainly the structures and defines) are
  * from the original reiser fs code, as found in the linux kernel.
  */
diff --git a/fs/reiserfs/reiserfs_private.h b/fs/reiserfs/reiserfs_private.h
index 5936f214005..3d8f3f00b26 100644
--- a/fs/reiserfs/reiserfs_private.h
+++ b/fs/reiserfs/reiserfs_private.h
@@ -11,6 +11,7 @@
  */
 
 /* An implementation for the ReiserFS filesystem ported from GRUB.
+#include <linux/types.h>
  * Some parts of this code (mainly the structures and defines) are
  * from the original reiser fs code, as found in the linux kernel.
  */
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index 59e18d0c049..ae9c4964a55 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -9,6 +9,7 @@
 #include <os.h>
 #include <sandboxfs.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index a20407688cd..ad73191bc25 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifndef __UBOOT__
 #include <linux/module.h>
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 85f760e41a1..e436b0bcf61 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -13,6 +13,7 @@
 
 /* Checking helper functions */
 #include <linux/printk.h>
+#include <linux/types.h>
 typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
 				 struct ubifs_zbranch *zbr, void *priv);
 typedef int (*dbg_znode_callback)(struct ubifs_info *c,
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 5a0fa3aa4e4..8b5a11a6669 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -39,6 +39,7 @@
  * to @c->max_write_size bytes again. We do this by temporarily shrinking
  * write-buffer size (@wbuf->size).
  *
+#include <linux/types.h>
  * Write-buffers are defined by 'struct ubifs_wbuf' objects and protected by
  * mutexes defined inside these objects. Since sometimes upper-level code
  * has to lock the write-buffer (e.g. journal space reservation code), many
diff --git a/fs/ubifs/key.h b/fs/ubifs/key.h
index 6677ff06a26..ec3c927b5a9 100644
--- a/fs/ubifs/key.h
+++ b/fs/ubifs/key.h
@@ -35,6 +35,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 static inline uint32_t key_mask_hash(uint32_t hash)
 {
 	hash &= UBIFS_S_KEY_HASH_MASK;
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 2e4678cfaa8..2deb6a103af 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -23,6 +23,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include "ubifs.h"
 
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index 2f0d1c6eb51..7ece2986a32 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -27,6 +27,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "crc16.h"
 #endif
 #include "ubifs.h"
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index a54e4928fc0..57ca0922c5d 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -22,6 +22,7 @@
  * This helper function returns %1 if @znode is dirty and %0 otherwise.
  */
 #include <linux/kernel.h>
+#include <linux/types.h>
 static inline int ubifs_zn_dirty(const struct ubifs_znode *znode)
 {
 	return !!test_bit(DIRTY_ZNODE, &znode->flags);
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index a7df0364a17..5393c5b4528 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -12,6 +12,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include "ubifs.h"
 
 /*
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 24c66ce1688..ec428e8e81d 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -12,6 +12,7 @@
  * This file implements functions needed to recover from unclean un-mounts.
  * When UBIFS is mounted, it checks a flag on the master node to determine if
  * an un-mount was completed successfully. If not, the process of mounting
+#include <linux/types.h>
  * incorporates additional checking and fixing of on-flash data structures.
  * UBIFS always cleans away all remnants of an unclean un-mount, so that
  * errors do not accumulate. However UBIFS defers recovery if it is mounted
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 845a270ce51..d0c571aa163 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -28,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include "ubifs.h"
 #include <linux/bug.h>
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 218cbfade10..8ba7f6a2f69 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #endif
 #include "ubifs.h"
 
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 9c37fa2254c..126701afe83 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -43,6 +43,7 @@
 #include <linux/stat.h>
 #include <linux/err.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ubifs.h"
 #include <ubi_uboot.h>
 #include <linux/stringify.h>
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index b9174c8798f..dfb7b53a4c2 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -33,6 +33,7 @@
 #include <linux/kernel.h>
 #include <linux/stat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include "ubifs.h"
 
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index 659ff2e2ce2..f2ad55e9fdc 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -20,6 +20,7 @@
 #include <dm/devres.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #endif
 #include "ubifs.h"
 
diff --git a/fs/ubifs/ubifs-media.h b/fs/ubifs/ubifs-media.h
index 2b5b26a01b0..a4ec288de34 100644
--- a/fs/ubifs/ubifs-media.h
+++ b/fs/ubifs/ubifs-media.h
@@ -10,6 +10,8 @@
 
 /*
  * This file describes UBIFS on-flash format and contains definitions of all the
+#include <compiler.h>
+#include <linux/types.h>
  * relevant data structures and constants.
  *
  * All UBIFS on-flash objects are stored in the form of nodes. All nodes start
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index e76839e098d..ddfa86bbc5b 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -22,6 +22,7 @@
 #include <asm/global_data.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "ubifs.h"
 #include <part.h>
 #include <dm/devres.h>
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index c8a33fa36ed..b63b1326207 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -37,6 +37,7 @@
 #include <ubifs_uboot.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #include <linux/ctype.h>
 #include <linux/time.h>
diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c
index 62f034552e5..3f42438a00b 100644
--- a/fs/yaffs2/yaffs_uboot_glue.c
+++ b/fs/yaffs2/yaffs_uboot_glue.c
@@ -27,6 +27,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include <config.h>
 #include "nand.h"
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index 8f43d3ac085..004abbd2851 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "yaffsfs.h"
 #include "yaffs_guts.h"
 #include "yaffscfg.h"
diff --git a/fs/yaffs2/ydirectenv.h b/fs/yaffs2/ydirectenv.h
index cad7a35a4e5..b9e9ed1707e 100644
--- a/fs/yaffs2/ydirectenv.h
+++ b/fs/yaffs2/ydirectenv.h
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <linux/compat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "yaffs_osglue.h"
 
diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c
index 0bc872175e5..823ac8a0156 100644
--- a/fs/zfs/zfs.c
+++ b/fs/zfs/zfs.c
@@ -20,6 +20,7 @@
 #include <linux/time.h>
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 #include "zfs_common.h"
 #include "div64.h"
 
diff --git a/fs/zfs/zfs_fletcher.c b/fs/zfs/zfs_fletcher.c
index 008a303ec79..dd23f984ded 100644
--- a/fs/zfs/zfs_fletcher.c
+++ b/fs/zfs/zfs_fletcher.c
@@ -14,6 +14,7 @@
 #include <linux/time.h>
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 #include "zfs_common.h"
 
 #include <zfs/zfs.h>
diff --git a/fs/zfs/zfs_lzjb.c b/fs/zfs/zfs_lzjb.c
index c2a9ae1ddef..9ac42ac89aa 100644
--- a/fs/zfs/zfs_lzjb.c
+++ b/fs/zfs/zfs_lzjb.c
@@ -15,6 +15,7 @@
 #include <linux/time.h>
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 #include "zfs_common.h"
 
 #include <zfs/zfs.h>
diff --git a/fs/zfs/zfs_sha256.c b/fs/zfs/zfs_sha256.c
index cb5b1c06834..104918c6069 100644
--- a/fs/zfs/zfs_sha256.c
+++ b/fs/zfs/zfs_sha256.c
@@ -14,6 +14,7 @@
 #include <linux/time.h>
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 #include "zfs_common.h"
 
 #include <zfs/zfs.h>
diff --git a/include/ACEX1K.h b/include/ACEX1K.h
index 7c5253c66cc..dee789b148b 100644
--- a/include/ACEX1K.h
+++ b/include/ACEX1K.h
@@ -11,6 +11,7 @@
 #define _ACEX1K_H_
 
 #include <altera.h>
+#include <linux/types.h>
 
 extern int ACEX1K_load(Altera_desc *desc, const void *image, size_t size);
 extern int ACEX1K_dump(Altera_desc *desc, const void *buf, size_t bsize);
diff --git a/include/MCD_dma.h b/include/MCD_dma.h
index 2f16c89044e..f67d3529fc1 100644
--- a/include/MCD_dma.h
+++ b/include/MCD_dma.h
@@ -33,6 +33,8 @@
 
 #ifndef DEFINESONLY
 
+#include <linux/types.h>
+
 /* Portability typedefs */
 #if 1
 #include "common.h"
@@ -55,6 +57,7 @@ typedef char s8;
 #ifndef u8
 typedef unsigned char u8;
 #endif
+#include <asm/types.h>
 #endif
 
 /*
diff --git a/include/acpi/acpi_device.h b/include/acpi/acpi_device.h
index 1c6aceb20af..af6b65e7f04 100644
--- a/include/acpi/acpi_device.h
+++ b/include/acpi/acpi_device.h
@@ -13,6 +13,7 @@
 #include <spi.h>
 #include <stdbool.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 struct acpi_ctx;
 struct gpio_desc;
diff --git a/include/acpi/acpi_s3.h b/include/acpi/acpi_s3.h
index 1dc568117bd..5b9eed4c8c9 100644
--- a/include/acpi/acpi_s3.h
+++ b/include/acpi/acpi_s3.h
@@ -37,6 +37,7 @@
 extern char __wakeup[];
 extern int __wakeup_size;
 
+#include <asm/types.h>
 enum acpi_sleep_state {
 	ACPI_S0,
 	ACPI_S1,
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index fe9b29f3f82..91d169b4e23 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -13,7 +13,9 @@
 #ifndef __ACPI_TABLE_H__
 #define __ACPI_TABLE_H__
 
+#include <compiler.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #define RSDP_SIG		"RSD PTR "	/* RSDP pointer signature */
 #define OEM_ID			"U-BOOT"	/* U-Boot */
diff --git a/include/ahci.h b/include/ahci.h
index a6f32010ca2..ca457bfbf64 100644
--- a/include/ahci.h
+++ b/include/ahci.h
@@ -9,6 +9,7 @@
 
 #include <compiler.h>
 #include <pci.h>
+#include <linux/types.h>
 
 #define AHCI_PCI_BAR		0x24
 #define AHCI_MAX_SG		56 /* hardware max is 64K */
diff --git a/include/ali512x.h b/include/ali512x.h
index 6bb67009c1f..854ca60de69 100644
--- a/include/ali512x.h
+++ b/include/ali512x.h
@@ -7,6 +7,7 @@
 #ifndef __ASM_IC_ALI512X_H_
 #define __ASM_IC_ALI512X_H_
 
+#include <asm/types.h>
 # define ALI_INDEX    0x3f0
 # define ALI_DATA     0x3f1
 
diff --git a/include/altera.h b/include/altera.h
index 22d55cfd73e..1e991333c4e 100644
--- a/include/altera.h
+++ b/include/altera.h
@@ -5,6 +5,7 @@
  */
 
 #include <fpga.h>
+#include <linux/types.h>
 
 #ifndef _ALTERA_H_
 #define _ALTERA_H_
diff --git a/include/android_bootloader_message.h b/include/android_bootloader_message.h
index 286d7ab0f31..21e613bdad0 100644
--- a/include/android_bootloader_message.h
+++ b/include/android_bootloader_message.h
@@ -21,6 +21,7 @@
  * stddef.h
  */
 #include <compiler.h>
+#include <linux/types.h>
 #endif
 
 // Spaces used by misc partition are as below:
diff --git a/include/api_public.h b/include/api_public.h
index def103ce22f..38966da505f 100644
--- a/include/api_public.h
+++ b/include/api_public.h
@@ -8,6 +8,7 @@
 #ifndef _API_PUBLIC_H_
 #define _API_PUBLIC_H_
 
+#include <linux/types.h>
 #define API_EINVAL		1	/* invalid argument(s)	*/
 #define API_ENODEV		2	/* no device		*/
 #define API_ENOMEM		3	/* no memory		*/
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 7a6b90d7da0..57ff3b7f12d 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -24,6 +24,7 @@
 #include <membuff.h>
 #include <asm/u-boot.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 typedef struct global_data {
 	struct bd_info *bd;
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index acbe791c84b..eb9b7086612 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <dm/ofnode.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 struct acpi_gpio;
 struct ofnode_phandle_args;
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
index 7451718a61c..c364755102c 100644
--- a/include/asm-generic/int-ll64.h
+++ b/include/asm-generic/int-ll64.h
@@ -15,6 +15,7 @@
  * header files exported to user space
  */
 
+#include <asm/types.h>
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 7a2f0dba316..53972a8d75a 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -105,5 +105,6 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
 }
 #endif
 
+#include <asm/types.h>
 #endif /* !__ASSEMBLY__ */
 #endif /* __ASM_GENERIC_IO_H__ */
diff --git a/include/ata.h b/include/ata.h
index 3d870c973f2..ea1af5e6604 100644
--- a/include/ata.h
+++ b/include/ata.h
@@ -14,6 +14,7 @@
 #define _ATA_H
 
 #include <libata.h>
+#include <linux/types.h>
 
 /* Register addressing depends on the hardware design; for instance,
  * 8-bit (register) and 16-bit (data) accesses might use different
diff --git a/include/atf_common.h b/include/atf_common.h
index fd5454c55b4..231406783fe 100644
--- a/include/atf_common.h
+++ b/include/atf_common.h
@@ -72,6 +72,7 @@
  * Structure used for telling the next BL how much of a particular type of
  * memory is available for its use and how much is already used.
  ******************************************************************************/
+#include <linux/types.h>
 struct aapcs64_params {
 	unsigned long arg0;
 	unsigned long arg1;
diff --git a/include/atmel_hlcdc.h b/include/atmel_hlcdc.h
index 5e339f50f26..0272d45584b 100644
--- a/include/atmel_hlcdc.h
+++ b/include/atmel_hlcdc.h
@@ -2,6 +2,7 @@
 /*
  *  Header file for AT91/AT32 MULTI LAYER LCD Controller
  *
+#include <asm/types.h>
  *  Data structure and register user interface
  *
  *  Copyright (C) 2012 Atmel Corporation
diff --git a/include/atmel_lcd.h b/include/atmel_lcd.h
index 4aa955b6b2d..8d94769d8dc 100644
--- a/include/atmel_lcd.h
+++ b/include/atmel_lcd.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  * atmel_lcd.h - Atmel LCD Controller structures
  *
  * (C) Copyright 2001
@@ -9,6 +10,8 @@
 #ifndef _ATMEL_LCD_H_
 #define _ATMEL_LCD_H_
 
+#include <linux/types.h>
+
 /**
  * struct atmel_lcd_platdata - platform data for Atmel LCDs with driver model
  *
diff --git a/include/atmel_mci.h b/include/atmel_mci.h
index c7591166eeb..2f73e675e01 100644
--- a/include/atmel_mci.h
+++ b/include/atmel_mci.h
@@ -10,6 +10,7 @@ int atmel_mci_init(void *regs);
 #ifndef __ASSEMBLY__
 
 /*
+#include <asm/types.h>
  * Structure for struct SoC access.
  * Names starting with '_' are fillers.
  */
diff --git a/include/atsha204a-i2c.h b/include/atsha204a-i2c.h
index 5c1ab65eef7..b32d159993f 100644
--- a/include/atsha204a-i2c.h
+++ b/include/atsha204a-i2c.h
@@ -13,6 +13,7 @@
 #define _ATSHA204_I2C_H_
 
 #include <stdbool.h>
+#include <linux/types.h>
 enum atsha204a_zone
 {
 	ATSHA204A_ZONE_CONFIG	= 0,
diff --git a/include/audio_codec.h b/include/audio_codec.h
index 2ea4ff096e6..202f5ca3929 100644
--- a/include/audio_codec.h
+++ b/include/audio_codec.h
@@ -7,6 +7,7 @@
 #ifndef __AUDIO_CODEC_H__
 #define __AUDIO_CODEC_H__
 
+#include <linux/types.h>
 struct udevice;
 
 /*
diff --git a/include/autoboot.h b/include/autoboot.h
index ac8157e5704..398c5562652 100644
--- a/include/autoboot.h
+++ b/include/autoboot.h
@@ -11,6 +11,8 @@
 #ifndef __AUTOBOOT_H
 #define __AUTOBOOT_H
 
+#include <linux/stddef.h>
+
 #ifdef CONFIG_AUTOBOOT
 /**
  * bootdelay_process() - process the bootd delay
diff --git a/include/avb_verify.h b/include/avb_verify.h
index 8aebe75ac91..7ee137b0a73 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -11,6 +11,7 @@
 #include <../lib/libavb/libavb.h>
 #include <mapmem.h>
 #include <mmc.h>
+#include <linux/types.h>
 
 #define AVB_MAX_ARGS			1024
 #define VERITY_TABLE_OPT_RESTART	"restart_on_corruption"
diff --git a/include/axi.h b/include/axi.h
index 59fb0b2e458..abffd2f12b7 100644
--- a/include/axi.h
+++ b/include/axi.h
@@ -7,6 +7,7 @@
 #ifndef _AXI_H_
 #define _AXI_H_
 
+#include <linux/types.h>
 struct udevice;
 
 /**
diff --git a/include/binman.h b/include/binman.h
index e0b92075e27..4da86685daf 100644
--- a/include/binman.h
+++ b/include/binman.h
@@ -9,6 +9,7 @@
 #ifndef _BINMAN_H_
 #define _BINMAN_H_
 
+#include <asm/types.h>
 #include <dm/ofnode.h>
 
 /**
diff --git a/include/blk.h b/include/blk.h
index abcd4bedbbb..103922e2b83 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -8,6 +8,7 @@
 #define BLK_H
 
 #include <efi.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_64BIT_LBA
 typedef uint64_t lbaint_t;
diff --git a/include/bloblist.h b/include/bloblist.h
index 609ac421d66..5feb76de284 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -13,6 +13,7 @@
 #ifndef __BLOBLIST_H
 #define __BLOBLIST_H
 
+#include <linux/types.h>
 enum {
 	BLOBLIST_VERSION	= 0,
 	BLOBLIST_MAGIC		= 0xb00757a3,
diff --git a/include/board.h b/include/board.h
index d9f7aafb49b..2944eea66c5 100644
--- a/include/board.h
+++ b/include/board.h
@@ -6,6 +6,7 @@
 
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 struct udevice;
 
 /*
diff --git a/include/bootcount.h b/include/bootcount.h
index a3ce4094854..f08339a4805 100644
--- a/include/bootcount.h
+++ b/include/bootcount.h
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <env.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_BOOTCOUNT
 
diff --git a/include/bootm.h b/include/bootm.h
index 0350c349f37..abb6ab891bf 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -8,6 +8,7 @@
 #define _BOOTM_H
 
 #include <image.h>
+#include <linux/types.h>
 
 struct cmd_tbl;
 
diff --git a/include/bootstage.h b/include/bootstage.h
index 670f785c89e..c08ec84447e 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -12,6 +12,7 @@
 #define _BOOTSTAGE_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 
 /* Flags for each bootstage record */
 enum bootstage_flags {
diff --git a/include/broadcom/chimp.h b/include/broadcom/chimp.h
index 7f641529139..661c79a5fa7 100644
--- a/include/broadcom/chimp.h
+++ b/include/broadcom/chimp.h
@@ -7,6 +7,7 @@
 #ifndef __CHIMP_H__
 #define __CHIMP_H__
 
+#include <asm/types.h>
 #include <linux/compiler.h>
 
 /**
diff --git a/include/btrfs.h b/include/btrfs.h
index a7605e15897..ed5869ce733 100644
--- a/include/btrfs.h
+++ b/include/btrfs.h
@@ -8,6 +8,7 @@
 #ifndef __U_BOOT_BTRFS_H__
 #define __U_BOOT_BTRFS_H__
 
+#include <linux/types.h>
 struct blk_desc;
 struct disk_partition;
 
diff --git a/include/bus_vcxk.h b/include/bus_vcxk.h
index eecba407bfa..d4952af4794 100644
--- a/include/bus_vcxk.h
+++ b/include/bus_vcxk.h
@@ -7,6 +7,7 @@
 #ifndef __BUS_VCXK_H_
 #define __BUS_VCXK_H_
 
+#include <linux/types.h>
 extern int vcxk_init(unsigned long width, unsigned long height);
 extern void vcxk_setpixel(int x, int y, unsigned long color);
 extern int vcxk_acknowledge_wait(void);
diff --git a/include/cache.h b/include/cache.h
index ecb7956efd5..d142b3fc144 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -6,6 +6,8 @@
 #ifndef __CACHE_H
 #define __CACHE_H
 
+#include <asm/types.h>
+
 struct udevice;
 
 /*
diff --git a/include/capitalization.h b/include/capitalization.h
index 9d7e8d259c6..29c9e5da11b 100644
--- a/include/capitalization.h
+++ b/include/capitalization.h
@@ -3,6 +3,7 @@
  * Capitalization tables
  */
 
+#include <asm/types.h>
 struct capitalization_table {
 	u16 upper;
 	u16 lower;
diff --git a/include/cavium/atf.h b/include/cavium/atf.h
index 3cf05c43d72..3e4a48c436e 100644
--- a/include/cavium/atf.h
+++ b/include/cavium/atf.h
@@ -5,6 +5,7 @@
 #ifndef __ATF_H__
 #define __ATF_H__
 #include <cavium/atf_part.h>
+#include <linux/types.h>
 
 ssize_t atf_read_mmc(uintptr_t offset, void *buffer, size_t size);
 ssize_t atf_read_nor(uintptr_t offset, void *buffer, size_t size);
diff --git a/include/cbfs.h b/include/cbfs.h
index 5f296d6a371..44393b5e4ef 100644
--- a/include/cbfs.h
+++ b/include/cbfs.h
@@ -8,6 +8,7 @@
 
 #include <compiler.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 enum cbfs_result {
 	CBFS_SUCCESS = 0,
diff --git a/include/cli.h b/include/cli.h
index 8a0b02cf1da..b61bd9a13ed 100644
--- a/include/cli.h
+++ b/include/cli.h
@@ -9,6 +9,7 @@
 
 #include <stdbool.h>
 #include <time.h>
+#include <linux/types.h>
 
 /**
  * Go into the command loop
diff --git a/include/clk-uclass.h b/include/clk-uclass.h
index dac42dab368..5dbdba91d58 100644
--- a/include/clk-uclass.h
+++ b/include/clk-uclass.h
@@ -11,6 +11,7 @@
 /* See clk.h for background documentation. */
 
 #include <clk.h>
+#include <linux/types.h>
 
 struct ofnode_phandle_args;
 
diff --git a/include/command.h b/include/command.h
index bc7786dd4a4..0bd3b1ac7ec 100644
--- a/include/command.h
+++ b/include/command.h
@@ -29,6 +29,7 @@
  * Monitor Command Table
  */
 
+#include <linux/types.h>
 struct cmd_tbl {
 	char		*name;		/* Command Name			*/
 	int		maxargs;	/* maximum number of arguments	*/
diff --git a/include/common.h b/include/common.h
index 868576038a7..2e95d0ebdf5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -14,7 +14,6 @@
 
 #ifndef __ASSEMBLY__		/* put C only stuff in this section */
 #include <config.h>
-#include <linux/types.h>
 #endif	/* __ASSEMBLY__ */
 
 /* Pull in stuff for the build system */
diff --git a/include/cpsw.h b/include/cpsw.h
index 9a237d9abe8..5fe2e4a4de6 100644
--- a/include/cpsw.h
+++ b/include/cpsw.h
@@ -17,6 +17,7 @@
 #define _CPSW_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/ofnode.h>
 
 /* reg offset */
diff --git a/include/cpu.h b/include/cpu.h
index 089e74c262b..2ac9fac92a2 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -7,6 +7,7 @@
 #ifndef __CPU_H
 #define __CPU_H
 
+#include <linux/types.h>
 struct udevice;
 
 /**
diff --git a/include/cramfs/cramfs_fs.h b/include/cramfs/cramfs_fs.h
index e0c14f04af5..36b28bcc4bf 100644
--- a/include/cramfs/cramfs_fs.h
+++ b/include/cramfs/cramfs_fs.h
@@ -1,6 +1,7 @@
 #ifndef __CRAMFS_H
 #define __CRAMFS_H
 
+#include <asm/types.h>
 #define CRAMFS_MAGIC		0x28cd3d45	/* some random number */
 #define CRAMFS_SIGNATURE	"Compressed ROMFS"
 
diff --git a/include/cros_ec.h b/include/cros_ec.h
index ceb3916ae89..df15d85b1d5 100644
--- a/include/cros_ec.h
+++ b/include/cros_ec.h
@@ -14,6 +14,7 @@
 #include <asm/gpio.h>
 #include <dm/of_extra.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Our configuration information */
 struct cros_ec_dev {
diff --git a/include/crypto/pkcs7.h b/include/crypto/pkcs7.h
index ca35df29f6f..e36e7846079 100644
--- a/include/crypto/pkcs7.h
+++ b/include/crypto/pkcs7.h
@@ -13,6 +13,7 @@
 #include <crypto/public_key.h>
 #endif
 
+#include <linux/types.h>
 struct key;
 struct pkcs7_message;
 
diff --git a/include/crypto/pkcs7_parser.h b/include/crypto/pkcs7_parser.h
index 053ba7826a3..929ead81b06 100644
--- a/include/crypto/pkcs7_parser.h
+++ b/include/crypto/pkcs7_parser.h
@@ -13,6 +13,7 @@
 #include <crypto/pkcs7.h>
 #include <crypto/x509_parser.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 #define kenter(FMT, ...) \
 	pr_devel("==> %s("FMT")\n", __func__, ##__VA_ARGS__)
diff --git a/include/crypto/x509_parser.h b/include/crypto/x509_parser.h
index b793cbde735..381e6b9d1fa 100644
--- a/include/crypto/x509_parser.h
+++ b/include/crypto/x509_parser.h
@@ -12,6 +12,7 @@
 #include <linux/time.h>
 #include <crypto/public_key.h>
 #include <keys/asymmetric-type.h>
+#include <linux/types.h>
 
 struct x509_certificate {
 	struct x509_certificate *next;
diff --git a/include/ddr_spd.h b/include/ddr_spd.h
index fe163da43e5..15b97798634 100644
--- a/include/ddr_spd.h
+++ b/include/ddr_spd.h
@@ -10,6 +10,7 @@
  * Format from "JEDEC Standard No. 21-C,
  * Appendix D: Rev 1.0: SPD's for DDR SDRAM
  */
+#include <linux/types.h>
 typedef struct ddr1_spd_eeprom_s {
 	unsigned char info_size;   /*  0 # bytes written into serial memory */
 	unsigned char chip_size;   /*  1 Total # bytes of SPD memory device */
diff --git a/include/dfu.h b/include/dfu.h
index 764b7757289..94341137dee 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -17,6 +17,7 @@
 #include <linux/list.h>
 #include <mmc.h>
 #include <spi_flash.h>
+#include <linux/types.h>
 #include <linux/usb/composite.h>
 
 enum dfu_device_type {
diff --git a/include/display.h b/include/display.h
index 2c8aca4e48b..9d630eb7d8e 100644
--- a/include/display.h
+++ b/include/display.h
@@ -7,6 +7,7 @@
 #define _DISPLAY_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 
 struct udevice;
 struct display_timing;
diff --git a/include/display_options.h b/include/display_options.h
index 00246955121..54187d021d4 100644
--- a/include/display_options.h
+++ b/include/display_options.h
@@ -10,6 +10,7 @@
 #define __DISPLAY_OPTIONS_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 
 /**
  * print_size() - Print a size with a suffix
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 07857cf1be7..141f211a3e3 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -13,6 +13,7 @@
 #include <stdbool.h>
 #include <asm/global_data.h>
 #include <dm/ofnode.h>
+#include <linux/types.h>
 
 struct device_node;
 struct udevice;
diff --git a/include/dm/device.h b/include/dm/device.h
index 90fb96599b2..9a98d2b3d41 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -18,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 
 struct driver_info;
 
diff --git a/include/dm/devres.h b/include/dm/devres.h
index daeefd7ea3e..d2bf98f37df 100644
--- a/include/dm/devres.h
+++ b/include/dm/devres.h
@@ -13,6 +13,7 @@
 
 #include <linux/compat.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/include/dm/of.h b/include/dm/of.h
index 3d6e23a9340..21666741291 100644
--- a/include/dm/of.h
+++ b/include/dm/of.h
@@ -11,6 +11,7 @@
 #include <asm/u-boot.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* integer value within a device tree property which references another node */
 typedef u32 phandle;
diff --git a/include/dm/of_access.h b/include/dm/of_access.h
index 6f01196b76c..d4f5591b985 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -19,6 +19,7 @@
 
 #include <stdbool.h>
 #include <dm/of.h>
+#include <linux/types.h>
 
 /**
  * of_find_all_nodes - Get next node in global list
diff --git a/include/dm/of_addr.h b/include/dm/of_addr.h
index 3fa1ffce81a..bbe1557634d 100644
--- a/include/dm/of_addr.h
+++ b/include/dm/of_addr.h
@@ -24,6 +24,7 @@
  * @in_addr: pointer to input address
  * @return translated address or OF_BAD_ADDR on error
  */
+#include <linux/types.h>
 u64 of_translate_address(const struct device_node *no, const __be32 *in_addr);
 
 /**
diff --git a/include/dm/of_extra.h b/include/dm/of_extra.h
index ca15df21b06..763d8cf0814 100644
--- a/include/dm/of_extra.h
+++ b/include/dm/of_extra.h
@@ -8,6 +8,7 @@
 #define _DM_OF_EXTRA_H
 
 #include <dm/ofnode.h>
+#include <linux/types.h>
 
 enum fmap_compress_t {
 	FMAP_COMPRESS_NONE,
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index cc700d2b658..5e5da953fd7 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <stdbool.h>
 #include <dm/of.h>
+#include <linux/types.h>
 
 /* Enable checks to protect against invalid calls */
 #undef OF_CHECKS
diff --git a/include/dm/pci.h b/include/dm/pci.h
index 10f9fd9e378..7d644f42d42 100644
--- a/include/dm/pci.h
+++ b/include/dm/pci.h
@@ -6,6 +6,7 @@
 #ifndef __DM_PCI_H
 #define __DM_PCI_H
 
+#include <asm/types.h>
 struct udevice;
 
 /**
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index f879901279d..0afaa8a8884 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -6,6 +6,7 @@
 #ifndef __PINCTRL_H
 #define __PINCTRL_H
 
+#include <asm/types.h>
 #include <linux/errno.h>
 #define PINNAME_SIZE	10
 #define PINMUX_SIZE	40
diff --git a/include/dm/platdata.h b/include/dm/platdata.h
index cab93b071ba..f8df68fe5f1 100644
--- a/include/dm/platdata.h
+++ b/include/dm/platdata.h
@@ -11,6 +11,7 @@
 #define _DM_PLATDATA_H
 
 #include <linker_lists.h>
+#include <linux/types.h>
 
 /**
  * struct driver_info - Information required to instantiate a device
diff --git a/include/dm/platform_data/fsl_espi.h b/include/dm/platform_data/fsl_espi.h
index 812933f51cd..869a3aa239a 100644
--- a/include/dm/platform_data/fsl_espi.h
+++ b/include/dm/platform_data/fsl_espi.h
@@ -6,6 +6,7 @@
 #ifndef __fsl_espi_h
 #define __fsl_espi_h
 
+#include <linux/types.h>
 struct fsl_espi_platdata {
 	uint flags;
 	uint speed_hz;
diff --git a/include/dm/platform_data/net_ethoc.h b/include/dm/platform_data/net_ethoc.h
index 855e9999a0a..d4d5505b294 100644
--- a/include/dm/platform_data/net_ethoc.h
+++ b/include/dm/platform_data/net_ethoc.h
@@ -7,6 +7,7 @@
 #define _ETHOC_H
 
 #include <net.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_DM_ETH
 
diff --git a/include/dm/platform_data/spi_coldfire.h b/include/dm/platform_data/spi_coldfire.h
index 8ad8eaedfde..db8f518f34d 100644
--- a/include/dm/platform_data/spi_coldfire.h
+++ b/include/dm/platform_data/spi_coldfire.h
@@ -6,6 +6,7 @@
 #ifndef __spi_coldfire_h
 #define __spi_coldfire_h
 
+#include <linux/types.h>
 #define MAX_CTAR_REGS		8
 #define MAX_CTAR_FIELDS		8
 
diff --git a/include/dm/platform_data/spi_davinci.h b/include/dm/platform_data/spi_davinci.h
index fbc62c262ab..0ba7b279e4a 100644
--- a/include/dm/platform_data/spi_davinci.h
+++ b/include/dm/platform_data/spi_davinci.h
@@ -7,6 +7,7 @@
 #ifndef __spi_davinci_h
 #define __spi_davinci_h
 
+#include <asm/types.h>
 struct davinci_spi_platdata {
 	struct davinci_spi_regs *regs;
 	u8 num_cs;	   /* total no. of CS available */
diff --git a/include/dm/read.h b/include/dm/read.h
index 0143ab8ccc0..b4e036432c1 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -11,6 +11,7 @@
 
 #include <stdbool.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <dm/fdtaddr.h>
 #include <dm/ofnode.h>
diff --git a/include/dm/root.h b/include/dm/root.h
index f2c73555671..316fcc05bbe 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -10,6 +10,7 @@
 #define _DM_ROOT_H_
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct udevice;
 
 /**
diff --git a/include/dm/test.h b/include/dm/test.h
index d39686cde28..b72c4301fbe 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -7,6 +7,7 @@
 #define __DM_TEST_H
 
 #include <dm.h>
+#include <linux/types.h>
 #include <test/test.h>
 
 /**
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 67ff7466c86..8b8efa90339 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -13,6 +13,7 @@
 #include <dm/uclass-id.h>
 #include <linker_lists.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 /**
  * struct uclass - a U-Boot drive class, collecting together similar drivers
diff --git a/include/dm9000.h b/include/dm9000.h
index f780e513f69..ca4c277d20d 100644
--- a/include/dm9000.h
+++ b/include/dm9000.h
@@ -13,4 +13,5 @@ void dm9000_write_srom_word(int offset, u16 val);
 void dm9000_read_srom_word(int offset, u8 *to);
 #endif
 
+#include <asm/types.h>
 #endif /* __DM9000_H__ */
diff --git a/include/dma-uclass.h b/include/dma-uclass.h
index 340437acc13..5b421d01477 100644
--- a/include/dma-uclass.h
+++ b/include/dma-uclass.h
@@ -12,6 +12,7 @@
 /* See dma.h for background documentation. */
 
 #include <dma.h>
+#include <linux/types.h>
 
 struct ofnode_phandle_args;
 
diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h
index 4c4024ef19f..eb91103b80a 100644
--- a/include/dw_hdmi.h
+++ b/include/dw_hdmi.h
@@ -11,6 +11,7 @@
 
 #include <edid.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 #define HDMI_EDID_BLOCK_SIZE            128
 
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index 6c583e5e7b6..8d1f642a6f4 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -10,6 +10,7 @@
 #define __DWC3_UBOOT_H_
 
 #include <generic-phy.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/usb/otg.h>
 #include <linux/usb/phy.h>
diff --git a/include/dwmmc.h b/include/dwmmc.h
index 46a9ca25bec..ab678d367a6 100644
--- a/include/dwmmc.h
+++ b/include/dwmmc.h
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <mmc.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #define DWMCI_CTRL		0x000
 #define	DWMCI_PWREN		0x004
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 444ba61e591..487bf998a13 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -19,6 +19,8 @@
  *      - ERR is the error code. (defined by EC_RES_ constants)
  *      - Px is the optional payload.
  *        it is not sent if the error code is not success.
+#include <compiler.h>
+#include <linux/types.h>
  *        (defined by ec_params_ and ec_response_ structures)
  *      - S is the checksum which is the sum of all payload bytes.
  *
diff --git a/include/edid.h b/include/edid.h
index 9a0612bf072..3486705b991 100644
--- a/include/edid.h
+++ b/include/edid.h
@@ -12,6 +12,7 @@
 #ifndef __EDID_H_
 #define __EDID_H_
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/types.h>
 
diff --git a/include/eeprom.h b/include/eeprom.h
index 06f2a471657..0934a2a8bab 100644
--- a/include/eeprom.h
+++ b/include/eeprom.h
@@ -7,6 +7,9 @@
 #ifndef __EEPROM_LEGACY_H
 #define __EEPROM_LEGACY_H
 
+#include <linux/errno.h>
+#include <linux/types.h>
+
 #if defined(CONFIG_CMD_EEPROM) || defined(CONFIG_ENV_IS_IN_EEPROM)
 void eeprom_init(int bus);
 int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
@@ -25,5 +28,4 @@ int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
 # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
 #endif
 
-#include <linux/errno.h>
 #endif
diff --git a/include/eeprom_layout.h b/include/eeprom_layout.h
index 730d963ab96..42eaabac1a7 100644
--- a/include/eeprom_layout.h
+++ b/include/eeprom_layout.h
@@ -9,6 +9,7 @@
 #ifndef _LAYOUT_
 #define _LAYOUT_
 
+#include <compiler.h>
 #define RESERVED_FIELDS			NULL
 #define LAYOUT_VERSION_UNRECOGNIZED	-1
 #define LAYOUT_VERSION_AUTODETECT	-2
diff --git a/include/efi_api.h b/include/efi_api.h
index 268d980b11f..2e902a2555a 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -16,10 +16,12 @@
 #ifndef _EFI_API_H
 #define _EFI_API_H
 
+#include <compiler.h>
 #include <efi.h>
 #include <charset.h>
 #include <pe.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_EFI_LOADER
 #include <asm/setjmp.h>
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 98944640bee..f74ef36a8f9 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -15,6 +15,8 @@
 #include <efi_api.h>
 #include <image.h>
 #include <pe.h>
+#include <stdbool.h>
+#include <linux/types.h>
 
 struct blk_desc;
 
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 25e5f56121e..d72e87ce23b 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -14,6 +14,7 @@
 #include <efi_loader.h>
 #include <linker_lists.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 #define EFI_ST_SUCCESS 0
 #define EFI_ST_FAILURE 1
diff --git a/include/efi_variable.h b/include/efi_variable.h
index 9a6fd808ce2..70155aff34a 100644
--- a/include/efi_variable.h
+++ b/include/efi_variable.h
@@ -7,6 +7,7 @@
 #define _EFI_VARIABLE_H
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/bitops.h>
 
 #define EFI_VARIABLE_READ_ONLY BIT(31)
diff --git a/include/env_default.h b/include/env_default.h
index 8a0c3057f0a..cb083e99bcc 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -9,6 +9,7 @@
 
 #include <env_callback.h>
 #include <linux/stringify.h>
+#include <linux/types.h>
 
 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
 env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
diff --git a/include/env_internal.h b/include/env_internal.h
index b26dc6239c8..f700df71468 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -16,6 +16,7 @@
 #define _ENV_INTERNAL_H_
 
 #include <linux/kconfig.h>
+#include <linux/types.h>
 
 /**************************************************************************
  *
diff --git a/include/ethsw.h b/include/ethsw.h
index 04e002d39f5..2eb79e2643c 100644
--- a/include/ethsw.h
+++ b/include/ethsw.h
@@ -8,6 +8,7 @@
 #ifndef _CMD_ETHSW_H_
 #define _CMD_ETHSW_H_
 
+#include <linux/types.h>
 #define ETHSW_MAX_CMD_PARAMS 20
 #define ETHSW_CMD_PORT_ALL -1
 #define ETHSW_CMD_VLAN_ALL -1
diff --git a/include/exports.h b/include/exports.h
index 28a6713ed71..62109d06451 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -17,6 +17,7 @@
 #endif
 
 #include <irq_func.h>
+#include <linux/types.h>
 
 struct cmd_tbl;
 struct spi_slave;
diff --git a/include/ext4fs.h b/include/ext4fs.h
index cb5d9cc0a5c..59a3319b82d 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -4,6 +4,7 @@
  * Uma Shankar <uma.shankar at samsung.com>
  * Manjunatha C Achar <a.manjunatha at samsung.com>
  *
+#include <linux/types.h>
  * Ext4 Extent data structures are taken from  original ext4 fs code
  * as found in the linux kernel.
  *
diff --git a/include/ext_common.h b/include/ext_common.h
index 30a0c248414..1078459723e 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -5,6 +5,7 @@
  * Uma Shankar <uma.shankar at samsung.com>
  * Manjunatha C Achar <a.manjunatha at samsung.com>
  *
+#include <linux/types.h>
  * Data structures and headers for ext4 support have been taken from
  * ext2 ls load support in Uboot
  *
diff --git a/include/exynos_lcd.h b/include/exynos_lcd.h
index 484bd36334f..329ce3fb655 100644
--- a/include/exynos_lcd.h
+++ b/include/exynos_lcd.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  * exynos_lcd.h - Exynos LCD Controller structures
  *
  * (C) Copyright 2001
diff --git a/include/fastboot-internal.h b/include/fastboot-internal.h
index bf2f2b3c891..5168e71d3a4 100644
--- a/include/fastboot-internal.h
+++ b/include/fastboot-internal.h
@@ -6,6 +6,7 @@
 /**
  * fastboot_buf_addr - base address of the fastboot download buffer
  */
+#include <asm/types.h>
 extern void *fastboot_buf_addr;
 
 /**
diff --git a/include/fastboot.h b/include/fastboot.h
index 1933b1d98e3..ac07238d9bb 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -12,6 +12,7 @@
 #ifndef _FASTBOOT_H_
 #define _FASTBOOT_H_
 
+#include <asm/types.h>
 #define FASTBOOT_VERSION	"0.4"
 
 /* The 64 defined bytes plus \0 */
diff --git a/include/fat.h b/include/fat.h
index 02742f92a5c..318bf658890 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -11,6 +11,7 @@
 
 #include <asm/byteorder.h>
 #include <fs.h>
+#include <linux/types.h>
 
 struct disk_partition;
 
diff --git a/include/fb_mmc.h b/include/fb_mmc.h
index 76ed7cd6be1..4ca91c82aca 100644
--- a/include/fb_mmc.h
+++ b/include/fb_mmc.h
@@ -6,6 +6,7 @@
 #ifndef _FB_MMC_H_
 #define _FB_MMC_H_
 
+#include <asm/types.h>
 struct blk_desc;
 struct disk_partition;
 
diff --git a/include/fb_nand.h b/include/fb_nand.h
index 6d7999f262f..36d4918d8eb 100644
--- a/include/fb_nand.h
+++ b/include/fb_nand.h
@@ -7,6 +7,7 @@
 #ifndef _FB_NAND_H_
 #define _FB_NAND_H_
 
+#include <asm/types.h>
 #include <jffs2/load_kernel.h>
 
 /**
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 443bfe5e3a3..2a6fd6ed5d0 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -118,6 +118,7 @@ static inline int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[],
 }
 #endif
 
+#include <linux/types.h>
 void fdt_fixup_ethernet(void *fdt);
 int fdt_find_and_setprop(void *fdt, const char *node, const char *prop,
 			 const void *val, int len, int create);
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 258a171dc7e..37f9d0f3ef0 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -18,6 +18,7 @@
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 #include <pci.h>
+#include <linux/types.h>
 
 /*
  * A typedef for a physical address. Note that fdt data is always big
diff --git a/include/fis.h b/include/fis.h
index 419807f1fe5..7642471f51e 100644
--- a/include/fis.h
+++ b/include/fis.h
@@ -9,6 +9,7 @@
 /*
 * Register - Host to Device FIS
 */
+#include <asm/types.h>
 typedef struct sata_fis_h2d {
 	u8 fis_type;
 	u8 pm_port_c;
diff --git a/include/flash.h b/include/flash.h
index 3bf6b22399e..3ff072da49c 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -15,6 +15,7 @@
  * FLASH Info: contains chip specific data, per FLASH bank
  */
 
+#include <linux/types.h>
 typedef struct {
 	ulong	size;			/* total bank size in bytes		*/
 	ushort	sector_count;		/* number of erase units		*/
diff --git a/include/fs.h b/include/fs.h
index b08b1f40c59..b001b190e3c 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -6,6 +6,7 @@
 #define _FS_H
 
 #include <common.h>
+#include <linux/types.h>
 
 struct cmd_tbl;
 
diff --git a/include/fs_loader.h b/include/fs_loader.h
index b728c06fcff..56b0bf64ff8 100644
--- a/include/fs_loader.h
+++ b/include/fs_loader.h
@@ -7,6 +7,7 @@
 #define _FS_LOADER_H_
 
 #include <dm.h>
+#include <linux/types.h>
 
 /**
  * struct phandle_part - A place for storing phandle of node and its partition
diff --git a/include/fsl-mc/fsl_dpaa_fd.h b/include/fsl-mc/fsl_dpaa_fd.h
index 5c092af15c8..491bd0a84fb 100644
--- a/include/fsl-mc/fsl_dpaa_fd.h
+++ b/include/fsl-mc/fsl_dpaa_fd.h
@@ -11,6 +11,7 @@
  * routines (lots of read-modify-writes) would be worst-case performance whether
  * or not circumstances required them.) */
 #include <linux/kernel.h>
+#include <linux/types.h>
 struct dpaa_fd {
 	union {
 		u32 words[8];
diff --git a/include/fsl-mc/fsl_dpbp.h b/include/fsl-mc/fsl_dpbp.h
index 2278ac952ea..12327545059 100644
--- a/include/fsl-mc/fsl_dpbp.h
+++ b/include/fsl-mc/fsl_dpbp.h
@@ -13,6 +13,7 @@
 #define __FSL_DPBP_H
 
 /* DPBP Version */
+#include <linux/types.h>
 #define DPBP_VER_MAJOR				3
 #define DPBP_VER_MINOR				3
 
diff --git a/include/fsl-mc/fsl_dpio.h b/include/fsl-mc/fsl_dpio.h
index 7788e1962e6..60702755d67 100644
--- a/include/fsl-mc/fsl_dpio.h
+++ b/include/fsl-mc/fsl_dpio.h
@@ -8,6 +8,7 @@
 #define _FSL_DPIO_H
 
 /* DPIO Version */
+#include <linux/types.h>
 #define DPIO_VER_MAJOR				4
 #define DPIO_VER_MINOR				2
 
diff --git a/include/fsl-mc/fsl_dpmac.h b/include/fsl-mc/fsl_dpmac.h
index 1cea123a316..ff42f6e9942 100644
--- a/include/fsl-mc/fsl_dpmac.h
+++ b/include/fsl-mc/fsl_dpmac.h
@@ -11,6 +11,7 @@
 #define __FSL_DPMAC_H
 
 /* DPMAC Version */
+#include <linux/types.h>
 #define DPMAC_VER_MAJOR				4
 #define DPMAC_VER_MINOR				2
 
diff --git a/include/fsl-mc/fsl_dpmng.h b/include/fsl-mc/fsl_dpmng.h
index 2148601e8a1..17d17d6324a 100644
--- a/include/fsl-mc/fsl_dpmng.h
+++ b/include/fsl-mc/fsl_dpmng.h
@@ -8,6 +8,7 @@
  * Contains general API for the Management Complex firmware
  */
 
+#include <linux/types.h>
 struct fsl_mc_io;
 
 /**
diff --git a/include/fsl-mc/fsl_dpni.h b/include/fsl-mc/fsl_dpni.h
index 96d81d99349..d1266af3471 100644
--- a/include/fsl-mc/fsl_dpni.h
+++ b/include/fsl-mc/fsl_dpni.h
@@ -7,6 +7,7 @@
 #define _FSL_DPNI_H
 
 /* DPNI Version */
+#include <linux/types.h>
 #define DPNI_VER_MAJOR				7
 #define DPNI_VER_MINOR				3
 
diff --git a/include/fsl-mc/fsl_dprc.h b/include/fsl-mc/fsl_dprc.h
index 950ecb07569..5ece93bcf27 100644
--- a/include/fsl-mc/fsl_dprc.h
+++ b/include/fsl-mc/fsl_dprc.h
@@ -9,6 +9,7 @@
 #define _FSL_DPRC_H
 
 /* DPRC Version */
+#include <linux/types.h>
 #define DPRC_VER_MAJOR				6
 #define DPRC_VER_MINOR				1
 
diff --git a/include/fsl-mc/fsl_dpsparser.h b/include/fsl-mc/fsl_dpsparser.h
index 48fb495059e..9ebdd803a67 100644
--- a/include/fsl-mc/fsl_dpsparser.h
+++ b/include/fsl-mc/fsl_dpsparser.h
@@ -8,6 +8,7 @@
 #define _FSL_DPSPARSER_H
 
 /* DPSPARSER last supported API version */
+#include <asm/types.h>
 #define DPSPARSER_VER_MAJOR				1
 #define DPSPARSER_VER_MINOR				0
 
diff --git a/include/fsl-mc/fsl_mc.h b/include/fsl-mc/fsl_mc.h
index 732b4953b5d..a7fd9bc70fe 100644
--- a/include/fsl-mc/fsl_mc.h
+++ b/include/fsl-mc/fsl_mc.h
@@ -7,8 +7,10 @@
 #define __FSL_MC_H__
 
 #include <common.h>
+#include <compiler.h>
 #include <asm/u-boot.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 #define MC_CCSR_BASE_ADDR \
 	((struct mc_ccsr_registers __iomem *)0x8340000)
diff --git a/include/fsl-mc/fsl_mc_cmd.h b/include/fsl-mc/fsl_mc_cmd.h
index 591cda96851..72cfce6d8e9 100644
--- a/include/fsl-mc/fsl_mc_cmd.h
+++ b/include/fsl-mc/fsl_mc_cmd.h
@@ -5,6 +5,8 @@
 #ifndef __FSL_MC_CMD_H
 #define __FSL_MC_CMD_H
 
+#include <compiler.h>
+#include <linux/types.h>
 #define MC_CMD_NUM_OF_PARAMS	7
 
 #define MAKE_UMASK64(_width) \
diff --git a/include/fsl-mc/fsl_mc_sys.h b/include/fsl-mc/fsl_mc_sys.h
index 9fb8164f505..0f0769385eb 100644
--- a/include/fsl-mc/fsl_mc_sys.h
+++ b/include/fsl-mc/fsl_mc_sys.h
@@ -8,6 +8,7 @@
 #ifndef _FSL_MC_SYS_H
 #define _FSL_MC_SYS_H
 
+#include <compiler.h>
 #include <asm/io.h>
 
 struct mc_command;
diff --git a/include/fsl-mc/fsl_qbman_base.h b/include/fsl-mc/fsl_qbman_base.h
index 7818fc28e6e..0f75c890b59 100644
--- a/include/fsl-mc/fsl_qbman_base.h
+++ b/include/fsl-mc/fsl_qbman_base.h
@@ -10,6 +10,7 @@
  * control this QBMan instance, these values may simply be place-holders. The
  * idea is simply that we be able to distinguish between them, eg. so that SWP
  * descriptors can identify which QBMan instance they belong to. */
+#include <linux/types.h>
 struct qbman_block_desc {
 	void *ccsr_reg_bar; /* CCSR register map */
 	int irq_rerr;  /* Recoverable error interrupt line */
diff --git a/include/fsl-mc/fsl_qbman_portal.h b/include/fsl-mc/fsl_qbman_portal.h
index ee0e4aa50dd..9633090a83b 100644
--- a/include/fsl-mc/fsl_qbman_portal.h
+++ b/include/fsl-mc/fsl_qbman_portal.h
@@ -7,6 +7,7 @@
 #define _FSL_QBMAN_PORTAL_H
 
 #include <fsl-mc/fsl_qbman_base.h>
+#include <linux/types.h>
 
 /* Create and destroy a functional object representing the given QBMan portal
  * descriptor. */
diff --git a/include/fsl-mc/ldpaa_wriop.h b/include/fsl-mc/ldpaa_wriop.h
index b55c39cbb29..3f915c4990d 100644
--- a/include/fsl-mc/ldpaa_wriop.h
+++ b/include/fsl-mc/ldpaa_wriop.h
@@ -7,6 +7,7 @@
 #define __LDPAA_WRIOP_H
 
 #include <phy.h>
+#include <asm/types.h>
 
 #define DEFAULT_WRIOP_MDIO1_NAME "FSL_MDIO0"
 #define DEFAULT_WRIOP_MDIO2_NAME "FSL_MDIO1"
diff --git a/include/fsl_csu.h b/include/fsl_csu.h
index 0e59ac3c324..818e975d9fe 100644
--- a/include/fsl_csu.h
+++ b/include/fsl_csu.h
@@ -7,6 +7,7 @@
 #ifndef __FSL_CSU_H__
 #define __FSL_CSU_H__
 
+#include <linux/types.h>
 enum csu_cslx_access {
 	CSU_NS_SUP_R = 0x08,
 	CSU_NS_SUP_W = 0x80,
diff --git a/include/fsl_ddr.h b/include/fsl_ddr.h
index 025d7a1e74b..21198cdb053 100644
--- a/include/fsl_ddr.h
+++ b/include/fsl_ddr.h
@@ -9,6 +9,7 @@
 #include <fsl_ddrc_version.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <asm/types.h>
 
 #include <common_timing_params.h>
 
diff --git a/include/fsl_ddr_sdram.h b/include/fsl_ddr_sdram.h
index 9d6e181987b..5d277b2a6c4 100644
--- a/include/fsl_ddr_sdram.h
+++ b/include/fsl_ddr_sdram.h
@@ -13,6 +13,7 @@
 #include <ddr_spd.h>
 #include <fsl_ddrc_version.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #define SDRAM_TYPE_DDR1		2
diff --git a/include/fsl_devdis.h b/include/fsl_devdis.h
index 1f1b0333172..113db2ef787 100644
--- a/include/fsl_devdis.h
+++ b/include/fsl_devdis.h
@@ -6,6 +6,7 @@
 #ifndef __FSL_DEVDIS_H_
 #define __FSL_DEVDIS_H_
 
+#include <linux/types.h>
 struct devdis_table {
 	char name[32];
 	u32 offset;
diff --git a/include/fsl_diu_fb.h b/include/fsl_diu_fb.h
index 139851ba1a8..d7b8fad2057 100644
--- a/include/fsl_diu_fb.h
+++ b/include/fsl_diu_fb.h
@@ -7,6 +7,7 @@
  * FSL DIU Framebuffer driver
  */
 
+#include <asm/types.h>
 int fsl_diu_init(u16 xres, u16 yres, u32 pixel_format, int gamma_fix);
 
 /* Prototypes for external board-specific functions */
diff --git a/include/fsl_dspi.h b/include/fsl_dspi.h
index 4fec83549e1..d0096c050f7 100644
--- a/include/fsl_dspi.h
+++ b/include/fsl_dspi.h
@@ -12,6 +12,7 @@
 #define _FSL_DSPI_H_
 
 /* DMA Serial Peripheral Interface (DSPI) */
+#include <asm/types.h>
 struct dspi {
 	u32 mcr;	/* 0x00 */
 	u32 resv0;	/* 0x04 */
diff --git a/include/fsl_errata.h b/include/fsl_errata.h
index 3123ceaaed5..645f2c8526a 100644
--- a/include/fsl_errata.h
+++ b/include/fsl_errata.h
@@ -15,6 +15,7 @@
 #include <asm/arch/soc.h>
 #endif
 #include <stdbool.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index e15d10c669d..4aa0013cdbb 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -12,6 +12,7 @@
 
 #include <linux/errno.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 
 /* needed for the mmc_cfg definition */
 #include <mmc.h>
diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h
index 78f0e18dde3..462a8b8040e 100644
--- a/include/fsl_esdhc_imx.h
+++ b/include/fsl_esdhc_imx.h
@@ -16,6 +16,7 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/byteorder.h>
+#include <linux/types.h>
 
 /* needed for the mmc_cfg definition */
 #include <mmc.h>
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index fd915335b2c..3a5c3aad514 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -790,6 +790,7 @@ enum ifc_nand_fir_opcodes {
 
 #ifndef __ASSEMBLY__
 #include <asm/io.h>
+#include <linux/types.h>
 
 extern void print_ifc_regs(void);
 extern void init_early_memctl_regs(void);
diff --git a/include/fsl_immap.h b/include/fsl_immap.h
index 5297c0b3f9b..33078e72775 100644
--- a/include/fsl_immap.h
+++ b/include/fsl_immap.h
@@ -9,6 +9,7 @@
 #define __FSL_IMMAP_H
 /*
  * DDR memory controller registers
+#include <asm/types.h>
  * This structure works for mpc83xx (DDR2 and DDR3), mpc85xx, mpc86xx.
  */
 struct ccsr_ddr {
diff --git a/include/fsl_lpuart.h b/include/fsl_lpuart.h
index 511fb843672..30c40e87af7 100644
--- a/include/fsl_lpuart.h
+++ b/include/fsl_lpuart.h
@@ -33,6 +33,7 @@ struct lpuart_fsl_reg32 {
 };
 #endif
 
+#include <linux/types.h>
 struct lpuart_fsl {
 	u8 ubdh;
 	u8 ubdl;
diff --git a/include/fsl_mdio.h b/include/fsl_mdio.h
index b8fed2a0d2c..2ce849f85fa 100644
--- a/include/fsl_mdio.h
+++ b/include/fsl_mdio.h
@@ -8,8 +8,10 @@
 #ifndef __FSL_PHY_H__
 #define __FSL_PHY_H__
 
+#include <compiler.h>
 #include <net.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 struct tsec_mii_mng {
diff --git a/include/fsl_memac.h b/include/fsl_memac.h
index d067f1511c6..c5425842990 100644
--- a/include/fsl_memac.h
+++ b/include/fsl_memac.h
@@ -8,6 +8,7 @@
 #define __MEMAC_H__
 
 #include <phy.h>
+#include <asm/types.h>
 
 struct memac {
 	/* memac general control and status registers */
diff --git a/include/fsl_mmdc.h b/include/fsl_mmdc.h
index 05fb41f4033..9ce570f0ed6 100644
--- a/include/fsl_mmdc.h
+++ b/include/fsl_mmdc.h
@@ -7,6 +7,7 @@
 #define FSL_MMDC_H
 
 /* PHY Write Leveling Configuration and Error Status Register (MPWLGCR) */
+#include <asm/types.h>
 #define MPWLGCR_HW_WL_EN		(1 << 0)
 
 /* PHY Pre-defined Compare and CA delay-line Configuration (MPPDCMPR2) */
diff --git a/include/fsl_qbman.h b/include/fsl_qbman.h
index 4687eb9bb18..eec53003d22 100644
--- a/include/fsl_qbman.h
+++ b/include/fsl_qbman.h
@@ -5,6 +5,8 @@
 
 #ifndef __FSL_QBMAN_H__
 #define __FSL_QBMAN_H__
+#include <compiler.h>
+#include <asm/types.h>
 void fdt_fixup_qportals(void *blob);
 void fdt_fixup_bportals(void *blob);
 void inhibit_portals(void __iomem *addr, int max_portals,
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index 1c6f1eb23ec..1ad5577dc7f 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_FSL_SEC_LE
 #define sec_in32(a)       in_le32(a)
diff --git a/include/fsl_sec_mon.h b/include/fsl_sec_mon.h
index fb838db0b53..32ef91d490d 100644
--- a/include/fsl_sec_mon.h
+++ b/include/fsl_sec_mon.h
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_SYS_FSL_SEC_MON_LE
 #define sec_mon_in32(a)       in_le32(a)
diff --git a/include/fsl_sfp.h b/include/fsl_sfp.h
index 613814d9057..573059e6b42 100644
--- a/include/fsl_sfp.h
+++ b/include/fsl_sfp.h
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <config.h>
 #include <asm/io.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_SYS_FSL_SRK_LE
 #define srk_in32(a)       in_le32(a)
diff --git a/include/fsl_tgec.h b/include/fsl_tgec.h
index 59cd856ba09..cf27a883d8f 100644
--- a/include/fsl_tgec.h
+++ b/include/fsl_tgec.h
@@ -8,6 +8,7 @@
 #define __TGEC_H__
 
 #include <phy.h>
+#include <asm/types.h>
 
 struct tgec {
 	/* 10GEC general control and status registers */
diff --git a/include/fsl_usb.h b/include/fsl_usb.h
index 5e3a935e9d8..b465e54adac 100644
--- a/include/fsl_usb.h
+++ b/include/fsl_usb.h
@@ -53,6 +53,7 @@ struct ccsr_usb_phy {
 #define CONFIG_SYS_FSL_USB_INTERNAL_SOC_CLK_EN (1 << 20)
 #endif
 #include <stdbool.h>
+#include <asm/types.h>
 #define CONFIG_SYS_FSL_USB_PLLPRG2_REF_DIV (1 << 4)
 #define CONFIG_SYS_FSL_USB_PLLPRG2_MFI (5 << 16)
 #define CONFIG_SYS_FSL_USB_PLLPRG2_PLL_EN (1 << 21)
diff --git a/include/fsl_wdog.h b/include/fsl_wdog.h
index 655f22ed9ac..f45e700616e 100644
--- a/include/fsl_wdog.h
+++ b/include/fsl_wdog.h
@@ -3,6 +3,7 @@
  * (C) Copyright 2015 Freescale Semiconductor, Inc.
  */
 
+#include <asm/types.h>
 struct watchdog_regs {
 	u16	wcr;	/* Control */
 	u16	wsr;	/* Service */
diff --git a/include/fuse.h b/include/fuse.h
index d48dcdfa647..6bd783086a3 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -19,6 +19,7 @@
  *
  *   Returns: 0 on success, not 0 on failure
  */
+#include <asm/types.h>
 int fuse_read(u32 bank, u32 word, u32 *val);
 int fuse_sense(u32 bank, u32 word, u32 *val);
 int fuse_prog(u32 bank, u32 word, u32 val);
diff --git a/include/gdsys_fpga.h b/include/gdsys_fpga.h
index 6d38a83d903..d684df32be1 100644
--- a/include/gdsys_fpga.h
+++ b/include/gdsys_fpga.h
@@ -36,6 +36,7 @@ extern struct ihs_fpga *fpga_ptr[];
 		     val)
 #endif
 
+#include <linux/types.h>
 struct ihs_gpio {
 	u16 read;
 	u16 clear;
diff --git a/include/gzip.h b/include/gzip.h
index 783acbb60d2..36a35572f2b 100644
--- a/include/gzip.h
+++ b/include/gzip.h
@@ -7,6 +7,7 @@
 #ifndef __GZIP_H
 #define __GZIP_H
 
+#include <linux/types.h>
 struct blk_desc;
 
 /**
diff --git a/include/hash.h b/include/hash.h
index 97bb3ed5d9a..ec8f266a9ce 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -6,6 +6,7 @@
 #ifndef _HASH_H
 #define _HASH_H
 
+#include <linux/types.h>
 struct cmd_tbl;
 
 /*
diff --git a/include/hda_codec.h b/include/hda_codec.h
index 56de571f0f7..1cc91ba4c12 100644
--- a/include/hda_codec.h
+++ b/include/hda_codec.h
@@ -10,6 +10,7 @@
 #ifndef __HDA_CODEC_H_
 #define __HDA_CODEC_H_
 
+#include <linux/types.h>
 struct hda_regs;
 
 /**
diff --git a/include/hw_sha.h b/include/hw_sha.h
index 991e496a3cb..de60ed8cbed 100644
--- a/include/hw_sha.h
+++ b/include/hw_sha.h
@@ -7,6 +7,7 @@
 #ifndef __HW_SHA_H
 #define __HW_SHA_H
 #include <hash.h>
+#include <linux/types.h>
 
 /**
  * Computes hash value of input pbuf using h/w acceleration
diff --git a/include/i2c.h b/include/i2c.h
index b8ee77d98bc..34227ef8148 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -19,6 +19,7 @@
 #include <linker_lists.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /*
  * For now there are essentially two parts to this file - driver model
diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h
index cd620d519fc..18e2ea815de 100644
--- a/include/i2c_eeprom.h
+++ b/include/i2c_eeprom.h
@@ -6,6 +6,7 @@
 #ifndef __I2C_EEPROM
 #define __I2C_EEPROM
 
+#include <linux/types.h>
 struct i2c_eeprom_ops {
 	int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
 	int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
diff --git a/include/i2s.h b/include/i2s.h
index 7760aab7c46..b5a117773c1 100644
--- a/include/i2s.h
+++ b/include/i2s.h
@@ -13,6 +13,7 @@
  * Describes the physical PCM data formating and clocking. Add new formats
  * to the end.
  */
+#include <linux/types.h>
 #define SND_SOC_DAIFMT_I2S		1 /* I2S mode */
 #define SND_SOC_DAIFMT_RIGHT_J		2 /* Right Justified mode */
 #define SND_SOC_DAIFMT_LEFT_J		3 /* Left Justified mode */
diff --git a/include/ide.h b/include/ide.h
index 1b37d67992c..37b2b4f5345 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -8,6 +8,7 @@
 #define _IDE_H
 
 #include <blk.h>
+#include <linux/types.h>
 
 #define IDE_BUS(dev)	(dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS))
 
diff --git a/include/imx8image.h b/include/imx8image.h
index 72daa6ed5d3..35b4b6f28f5 100644
--- a/include/imx8image.h
+++ b/include/imx8image.h
@@ -8,9 +8,11 @@
 #ifndef _IMX8IMAGE_H_
 #define _IMX8IMAGE_H_
 
+#include <compiler.h>
 #include <image.h>
 #include <inttypes.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "imagetool.h"
 
 #define __packed   __attribute__((packed))
diff --git a/include/imx_lpi2c.h b/include/imx_lpi2c.h
index 3ce9edaf101..5941b5363c0 100644
--- a/include/imx_lpi2c.h
+++ b/include/imx_lpi2c.h
@@ -9,6 +9,7 @@
 #define __IMX_LPI2C_H__
 
 #include <clk.h>
+#include <linux/types.h>
 
 struct imx_lpi2c_bus {
 	int index;
diff --git a/include/imximage.h b/include/imximage.h
index 1ed3284f154..6692696f107 100644
--- a/include/imximage.h
+++ b/include/imximage.h
@@ -61,6 +61,7 @@
 #define DCD_CHECK_BITS_CLR_PARAM	0x04
 
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 enum imximage_cmd {
 	CMD_INVALID,
 	CMD_IMAGE_VERSION,
diff --git a/include/input.h b/include/input.h
index 973d13f53b9..cee0762676c 100644
--- a/include/input.h
+++ b/include/input.h
@@ -9,6 +9,7 @@
 #define _INPUT_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 enum {
 	INPUT_MAX_MODIFIERS	= 4,
 	INPUT_BUFFER_LEN	= 16,
diff --git a/include/ioports.h b/include/ioports.h
index 1cd3ceb37a5..ae876c9be84 100644
--- a/include/ioports.h
+++ b/include/ioports.h
@@ -5,6 +5,7 @@
  */
 
 /*
+#include <linux/types.h>
  * this structure mirrors the layout of the five port registers in
  * the internal memory map
  */
diff --git a/include/ipu_pixfmt.h b/include/ipu_pixfmt.h
index 866ead0ec71..b230a2039dd 100644
--- a/include/ipu_pixfmt.h
+++ b/include/ipu_pixfmt.h
@@ -13,6 +13,7 @@
 
 #include <linux/list.h>
 #include <linux/fb.h>
+#include <linux/types.h>
 
 /*  IPU Pixel format definitions */
 #define fourcc(a, b, c, d)\
diff --git a/include/irq.h b/include/irq.h
index 150d7ce20c2..699b97a9cd7 100644
--- a/include/irq.h
+++ b/include/irq.h
@@ -9,6 +9,7 @@
 #define __irq_H
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct acpi_irq;
 struct ofnode_phandle_args;
 
diff --git a/include/jffs2/jffs2_1pass.h b/include/jffs2/jffs2_1pass.h
index 5bc3e66cd76..947202d5be9 100644
--- a/include/jffs2/jffs2_1pass.h
+++ b/include/jffs2/jffs2_1pass.h
@@ -1,3 +1,4 @@
+#include <asm/types.h>
 u32 jffs2_1pass_ls(struct part_info *part,const char *fname);
 u32 jffs2_1pass_load(char *dest, struct part_info *part,const char *fname);
 u32 jffs2_1pass_info(struct part_info *part);
diff --git a/include/jffs2/load_kernel.h b/include/jffs2/load_kernel.h
index 9346d7ee9f1..d3a3947d950 100644
--- a/include/jffs2/load_kernel.h
+++ b/include/jffs2/load_kernel.h
@@ -9,6 +9,7 @@
  * Description:   header for load kernel modules
  *-----------------------------------------------------------------------*/
 
+#include <asm/types.h>
 #include <linux/list.h>
 
 /* mtd device types */
diff --git a/include/k3-avs.h b/include/k3-avs.h
index e3c3cafbb9d..af9ad03acd3 100644
--- a/include/k3-avs.h
+++ b/include/k3-avs.h
@@ -10,6 +10,8 @@
 #ifndef _K3_AVS0_
 #define _K3_AVS0_
 
+#include <asm/types.h>
+
 #define AM6_VDD_WKUP		0
 #define AM6_VDD_MCU		1
 #define AM6_VDD_CORE		2
diff --git a/include/kendryte/bypass.h b/include/kendryte/bypass.h
index 2f0b17d7061..4ce3ef9ea3e 100644
--- a/include/kendryte/bypass.h
+++ b/include/kendryte/bypass.h
@@ -7,6 +7,7 @@
 
 #include <clk.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 struct k210_bypass {
 	struct clk clk;
diff --git a/include/kendryte/clk.h b/include/kendryte/clk.h
index 9c6245d468b..8d698a42948 100644
--- a/include/kendryte/clk.h
+++ b/include/kendryte/clk.h
@@ -7,6 +7,7 @@
 #define K210_CLK_H
 
 #define LOG_CATEGORY UCLASS_CLK
+#include <compiler.h>
 #include <linux/types.h>
 #include <linux/clk-provider.h>
 
diff --git a/include/kendryte/pll.h b/include/kendryte/pll.h
index 083f388c128..9ed84d1739b 100644
--- a/include/kendryte/pll.h
+++ b/include/kendryte/pll.h
@@ -6,6 +6,8 @@
 #define K210_PLL_H
 
 #include <clk.h>
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <test/export.h>
 
diff --git a/include/key_matrix.h b/include/key_matrix.h
index 519722f2d8f..7800075837a 100644
--- a/include/key_matrix.h
+++ b/include/key_matrix.h
@@ -9,6 +9,7 @@
 #define _KEY_MATRIX_H
 
 #include <common.h>
+#include <linux/types.h>
 
 /* Information about a matrix keyboard */
 struct key_matrix {
diff --git a/include/keys/asymmetric-type.h b/include/keys/asymmetric-type.h
index 2e8b0224b83..d5314d7e251 100644
--- a/include/keys/asymmetric-type.h
+++ b/include/keys/asymmetric-type.h
@@ -49,6 +49,7 @@ enum asymmetric_payload_bits {
  * What we actually do is provide a place where binary identifiers can be
  * stashed and then compare against them when checking for an id match.
  */
+#include <linux/types.h>
 struct asymmetric_key_id {
 	unsigned short	len;
 	unsigned char	data[];
diff --git a/include/lattice.h b/include/lattice.h
index 80fafc00dcb..83a82834b3f 100644
--- a/include/lattice.h
+++ b/include/lattice.h
@@ -13,6 +13,7 @@
 #ifndef _VME_OPCODE_H
 #define _VME_OPCODE_H
 
+#include <linux/types.h>
 #define VME_VERSION_NUMBER "12.1"
 
 /* Maximum declarations. */
diff --git a/include/lcd.h b/include/lcd.h
index 08086008694..1ea207cc2c6 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -17,6 +17,7 @@
 #include <bmp_layout.h>
 #include <asm/byteorder.h>
 #endif
+#include <linux/types.h>
 
 int bmp_display(ulong addr, int x, int y);
 struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
diff --git a/include/lcd_console.h b/include/lcd_console.h
index 061a6a41bbd..dbdc0dc6e0e 100644
--- a/include/lcd_console.h
+++ b/include/lcd_console.h
@@ -5,6 +5,7 @@
 
 /* By default we scroll by a single line */
 
+#include <linux/types.h>
 struct console_t {
 	short curr_col, curr_row;
 	short cols, rows;
diff --git a/include/lcdvideo.h b/include/lcdvideo.h
index f0640a53852..9946ceaed00 100644
--- a/include/lcdvideo.h
+++ b/include/lcdvideo.h
@@ -8,6 +8,7 @@
 
 /* LCD Controller Configuration Register.
 */
+#include <linux/types.h>
 #define LCCR_BNUM	((uint)0xfffe0000)
 #define LCCR_EIEN	((uint)0x00010000)
 #define LCCR_IEN	((uint)0x00008000)
diff --git a/include/libata.h b/include/libata.h
index 10e6057ef4a..94caa9ffbd7 100644
--- a/include/libata.h
+++ b/include/libata.h
@@ -10,6 +10,7 @@
 #ifndef __LIBATA_H__
 #define __LIBATA_H__
 
+#include <asm/types.h>
 enum {
 	/* various global constants */
 	ATA_MAX_DEVICES		= 2,	/* per bus/port */
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
index 864b05e432a..af2d589251e 100644
--- a/include/linux/mtd/omap_gpmc.h
+++ b/include/linux/mtd/omap_gpmc.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_OMAP_GPMC_H
 #define __ASM_OMAP_GPMC_H
 
+#include <linux/types.h>
+
 #define GPMC_BUF_EMPTY	0
 #define GPMC_BUF_FULL	1
 #define GPMC_MAX_SECTORS	8
diff --git a/include/linux/soc/ti/cppi5.h b/include/linux/soc/ti/cppi5.h
index 7447881eb26..48d8a103898 100644
--- a/include/linux/soc/ti/cppi5.h
+++ b/include/linux/soc/ti/cppi5.h
@@ -8,11 +8,14 @@
 #ifndef __TI_CPPI5_H__
 #define __TI_CPPI5_H__
 
+#include <compiler.h>
 #include <hexdump.h>
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
+#include <linux/kernel.h>
 #include <linux/printk.h>
+#include <linux/types.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 9176277ff0b..a2f709a3848 100644
--- a/include/linux/soc/ti/k3-navss-ringacc.h
+++ b/include/linux/soc/ti/k3-navss-ringacc.h
@@ -8,6 +8,7 @@
 #ifndef __SOC_TI_K3_NAVSS_RINGACC_API_H_
 #define __SOC_TI_K3_NAVSS_RINGACC_API_H_
 
+#include <asm/types.h>
 #include <dm/ofnode.h>
 #include <linux/bitops.h>
 
diff --git a/include/linux/soc/ti/k3-sec-proxy.h b/include/linux/soc/ti/k3-sec-proxy.h
index f34854ceebc..19c0ffc0d69 100644
--- a/include/linux/soc/ti/k3-sec-proxy.h
+++ b/include/linux/soc/ti/k3-sec-proxy.h
@@ -11,6 +11,7 @@
 #define K3_SEC_PROXY_H
 
 /**
+#include <linux/types.h>
  * struct k3_sec_proxy_msg - Secure proxy message structure
  * @len: Length of data in the Buffer
  * @buf: Buffer pointer
diff --git a/include/linux/soc/ti/ti-udma.h b/include/linux/soc/ti/ti-udma.h
index 04e354fb2d6..fc8bc186ced 100644
--- a/include/linux/soc/ti/ti-udma.h
+++ b/include/linux/soc/ti/ti-udma.h
@@ -8,6 +8,7 @@
 #define __TI_UDMA_H
 
 /**
+#include <asm/types.h>
  * struct ti_udma_drv_packet_data - TI UDMA transfer specific data
  *
  * @pkt_type: Packet Type - specific for each DMA client HW
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 1ae73240c80..e4239992dbc 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -12,6 +12,8 @@
 #define __TISCI_PROTOCOL_H
 
 /**
+#include <compiler.h>
+#include <asm/types.h>
  * struct ti_sci_version_info - version information structure
  * @abi_major:	Major ABI version. Change here implies risk of backward
  *		compatibility break.
diff --git a/include/lmb.h b/include/lmb.h
index 73b7a5cbe3d..971a696fffb 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -61,4 +61,5 @@ void arch_lmb_reserve(struct lmb *lmb);
 
 #endif /* __KERNEL__ */
 
+#include <linux/types.h>
 #endif /* _LINUX_LMB_H */
diff --git a/include/lynxkdi.h b/include/lynxkdi.h
index 38640277b29..1a2c47c295f 100644
--- a/include/lynxkdi.h
+++ b/include/lynxkdi.h
@@ -8,6 +8,7 @@
 #define __LYNXKDI_H__
 
 
+#include <linux/types.h>
 /* Boot parameter struct passed to kernel
  */
 typedef struct lynxos_bootparms_t {
diff --git a/include/lz4.h b/include/lz4.h
index 1276fb98a34..6cd82c41e9c 100644
--- a/include/lz4.h
+++ b/include/lz4.h
@@ -19,6 +19,7 @@
  *	buffer is overrun, -EEPROTO if the compressed data causes an error in
  *	the decompression algorithm
  */
+#include <linux/types.h>
 int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn);
 
 #endif
diff --git a/include/mailbox.h b/include/mailbox.h
index 93f4715e169..56360ba286e 100644
--- a/include/mailbox.h
+++ b/include/mailbox.h
@@ -32,6 +32,7 @@
  * messages. This header file describes the API used by clients.
  */
 
+#include <linux/types.h>
 struct udevice;
 
 /**
diff --git a/include/malloc.h b/include/malloc.h
index 36f8556f9fe..b93b5b43eda 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -60,6 +60,7 @@
   malloc_stats();
      Prints brief summary statistics on stderr.
   mallinfo()
+#include <linux/types.h>
      Returns (by copy) a struct containing various summary statistics.
   mallopt(int parameter_number, int parameter_value)
      Changes one of the tunable parameters described below. Returns
diff --git a/include/mapmem.h b/include/mapmem.h
index 2134c8004d9..0b2f929c307 100644
--- a/include/mapmem.h
+++ b/include/mapmem.h
@@ -12,6 +12,7 @@
 /* Define a null map_sysmem() if the architecture doesn't use it */
 # ifdef CONFIG_ARCH_MAP_SYSMEM
 #include <asm/io.h>
+#include <linux/types.h>
 # else
 static inline void *map_sysmem(phys_addr_t paddr, unsigned long len)
 {
diff --git a/include/mc9sdz60.h b/include/mc9sdz60.h
index ffe376bf507..b4bbfd72da9 100644
--- a/include/mc9sdz60.h
+++ b/include/mc9sdz60.h
@@ -15,6 +15,7 @@
  * but not include/linux/mfd/mc9s08dz60/pmic.h
  *
  */
+#include <asm/types.h>
 enum mc9sdz60_reg {
 	MC9SDZ60_REG_VERSION		= 0x00,
 	/* reserved                       0x01 */
diff --git a/include/memalign.h b/include/memalign.h
index cb0dcf39b41..841cac4944b 100644
--- a/include/memalign.h
+++ b/include/memalign.h
@@ -14,6 +14,7 @@
 #include <asm/cache.h>
 #include <malloc.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * The ALLOC_CACHE_ALIGN_BUFFER macro is used to allocate a buffer on the
diff --git a/include/miiphy.h b/include/miiphy.h
index 61c136b114c..a23215aa718 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -15,6 +15,7 @@
 #define _miiphy_h_
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/mii.h>
 #include <linux/list.h>
 #include <net.h>
diff --git a/include/mipi_dsi.h b/include/mipi_dsi.h
index 2abbbfa949b..171078a348b 100644
--- a/include/mipi_dsi.h
+++ b/include/mipi_dsi.h
@@ -19,6 +19,7 @@
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 struct mipi_dsi_host;
 struct mipi_dsi_device;
diff --git a/include/mm_communication.h b/include/mm_communication.h
index e464cbb48e2..b77364250a9 100644
--- a/include/mm_communication.h
+++ b/include/mm_communication.h
@@ -12,6 +12,7 @@
 #define _MM_COMMUNICATION_H_
 
 #include <part_efi.h>
+#include <linux/types.h>
 
 /*
  * Interface to the pseudo Trusted Application (TA), which provides a
diff --git a/include/mmc.h b/include/mmc.h
index d319f46e355..9c9b7638665 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -17,6 +17,7 @@
 #include <linux/compiler.h>
 #include <linux/dma-direction.h>
 #include <part.h>
+#include <linux/types.h>
 
 struct bd_info;
 
diff --git a/include/mpc86xx.h b/include/mpc86xx.h
index 9fe47480325..62477eb908c 100644
--- a/include/mpc86xx.h
+++ b/include/mpc86xx.h
@@ -40,6 +40,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 typedef struct {
 	unsigned long freq_processor;
 	unsigned long freq_systembus;
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index 4963c89642f..994cb1db93c 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -7,6 +7,7 @@
 #ifndef __CFI_FLASH_H__
 #define __CFI_FLASH_H__
 
+#include <asm/types.h>
 #define FLASH_CMD_CFI			0x98
 #define FLASH_CMD_READ_ID		0x90
 #define FLASH_CMD_RESET			0xff
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 8d472cc0138..988398ed330 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -8,6 +8,7 @@
 #ifndef __UBI_USER_H__
 #define __UBI_USER_H__
 
+#include <compiler.h>
 #include <linux/types.h>
 
 /*
diff --git a/include/mv88e6352.h b/include/mv88e6352.h
index 2e810c8183e..2cc149cd00c 100644
--- a/include/mv88e6352.h
+++ b/include/mv88e6352.h
@@ -8,6 +8,7 @@
 #define __MV886352_H
 
 #include <common.h>
+#include <asm/types.h>
 
 /* PHY registers */
 #define PHY(itf)	(itf)
diff --git a/include/mvebu/comphy.h b/include/mvebu/comphy.h
index 4a007ccb0f5..063be64d422 100644
--- a/include/mvebu/comphy.h
+++ b/include/mvebu/comphy.h
@@ -7,6 +7,7 @@
 #define _MVEBU_COMPHY_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dt-bindings/comphy/comphy_data.h>
 
 struct comphy_map {
diff --git a/include/mvebu_mmc.h b/include/mvebu_mmc.h
index 790199ca5e6..84df14a5ffb 100644
--- a/include/mvebu_mmc.h
+++ b/include/mvebu_mmc.h
@@ -12,6 +12,7 @@
 
 /* needed for the mmc_cfg definition */
 #include <mmc.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #define MMC_BLOCK_SIZE				512
diff --git a/include/mvmfp.h b/include/mvmfp.h
index 16f26841e20..93ca1ba35b0 100644
--- a/include/mvmfp.h
+++ b/include/mvmfp.h
@@ -47,6 +47,7 @@
  *
  * 				    offset, pull,pF, drv,dF, edge,eF ,afn,aF
  */
+#include <asm/types.h>
 #define MFP_OFFSET_MASK		MFP(0xffff,    0,    0,   0,   0,   0,   0)
 #define MFP_REG(x)		MFP(x,         0,    0,   0,   0,   0,   0)
 #define MFP_REG_GET_OFFSET(x)	((x & MFP_OFFSET_MASK) >> 16)
diff --git a/include/mxs_nand.h b/include/mxs_nand.h
index 92af891c187..e54bc9478c6 100644
--- a/include/mxs_nand.h
+++ b/include/mxs_nand.h
@@ -12,6 +12,7 @@
 #include <asm/cache.h>
 #include <nand.h>
 #include <asm/mach-imx/dma.h>
+#include <linux/types.h>
 
 /**
  * @gf_len:                   The length of Galois Field. (e.g., 13 or 14)
diff --git a/include/nand.h b/include/nand.h
index 80dd6469bc0..de36cac8bb9 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -9,6 +9,7 @@
 #define _NAND_H_
 
 #include <config.h>
+#include <linux/types.h>
 
 /*
  * All boards using a given driver must convert to self-init
diff --git a/include/net/ncsi-pkt.h b/include/net/ncsi-pkt.h
index a8e9def593f..640d8e1d789 100644
--- a/include/net/ncsi-pkt.h
+++ b/include/net/ncsi-pkt.h
@@ -6,6 +6,7 @@
 #ifndef __NCSI_PKT_H__
 #define __NCSI_PKT_H__
 
+#include <linux/types.h>
 struct ncsi_pkt_hdr {
 	unsigned char mc_id;        /* Management controller ID */
 	unsigned char revision;     /* NCSI version - 0x01      */
diff --git a/include/net/pcap.h b/include/net/pcap.h
index db9b2c4f69f..2007746e37c 100644
--- a/include/net/pcap.h
+++ b/include/net/pcap.h
@@ -13,6 +13,7 @@
  * @return	0 on success, -ERROR on error
  */
 #include <stdbool.h>
+#include <linux/types.h>
 int pcap_init(phys_addr_t paddr, unsigned long size);
 
 /**
diff --git a/include/net/pfe_eth/pfe/cbus/bmu.h b/include/net/pfe_eth/pfe/cbus/bmu.h
index 3a83e4dc1ca..5c062bef7d7 100644
--- a/include/net/pfe_eth/pfe/cbus/bmu.h
+++ b/include/net/pfe_eth/pfe/cbus/bmu.h
@@ -7,6 +7,7 @@
 #ifndef _BMU_H_
 #define _BMU_H_
 
+#include <asm/types.h>
 #define BMU_VERSION		0x000
 #define BMU_CTRL		0x004
 #define BMU_UCAST_CONFIG	0x008
diff --git a/include/net/pfe_eth/pfe/cbus/class_csr.h b/include/net/pfe_eth/pfe/cbus/class_csr.h
index 80f1f96b443..9b9f8550988 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 <asm/types.h>
 #include <linux/bitops.h>
 #define CLASS_VERSION			(CLASS_CSR_BASE_ADDR + 0x000)
 #define CLASS_TX_CTRL			(CLASS_CSR_BASE_ADDR + 0x004)
diff --git a/include/net/pfe_eth/pfe/cbus/gpi.h b/include/net/pfe_eth/pfe/cbus/gpi.h
index 6b5ba5d233f..abc7e66828e 100644
--- a/include/net/pfe_eth/pfe/cbus/gpi.h
+++ b/include/net/pfe_eth/pfe/cbus/gpi.h
@@ -7,6 +7,7 @@
 #ifndef _GPI_H_
 #define _GPI_H_
 
+#include <asm/types.h>
 #define GPI_VERSION			0x00
 #define GPI_CTRL			0x04
 #define GPI_RX_CONFIG			0x08
diff --git a/include/net/pfe_eth/pfe/cbus/tmu_csr.h b/include/net/pfe_eth/pfe/cbus/tmu_csr.h
index cfe8f8ce8fc..96dbb06561c 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 <asm/types.h>
 #include <linux/bitops.h>
 #define TMU_VERSION			(TMU_CSR_BASE_ADDR + 0x000)
 #define TMU_INQ_WATERMARK		(TMU_CSR_BASE_ADDR + 0x004)
diff --git a/include/net/pfe_eth/pfe/pfe_hw.h b/include/net/pfe_eth/pfe/pfe_hw.h
index c69fc69130c..cb9099e588a 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 <asm/types.h>
 #include <linux/bitops.h>
 #include "cbus.h"
 
diff --git a/include/net/pfe_eth/pfe_driver.h b/include/net/pfe_eth/pfe_driver.h
index fa9f2fa65dd..a4872b76402 100644
--- a/include/net/pfe_eth/pfe_driver.h
+++ b/include/net/pfe_eth/pfe_driver.h
@@ -7,6 +7,8 @@
 #ifndef __PFE_DRIVER_H__
 #define __PFE_DRIVER_H__
 
+#include <compiler.h>
+#include <linux/types.h>
 #include <net/pfe_eth/pfe/pfe_hw.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 
diff --git a/include/net/tftp.h b/include/net/tftp.h
index c411c9b2e65..5a285892d45 100644
--- a/include/net/tftp.h
+++ b/include/net/tftp.h
@@ -16,6 +16,7 @@
  */
 
 /* tftp.c */
+#include <linux/types.h>
 void tftp_start(enum proto_t protocol);	/* Begin TFTP get/put */
 
 #ifdef CONFIG_CMD_TFTPSRV
diff --git a/include/netdev.h b/include/netdev.h
index 52db3d56411..e862f4ce363 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -12,6 +12,7 @@
 #define _NETDEV_H_
 #include <phy_interface.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/include/nvme.h b/include/nvme.h
index 2cdf8ce320c..45eeed26828 100644
--- a/include/nvme.h
+++ b/include/nvme.h
@@ -7,6 +7,7 @@
 #ifndef __NVME_H__
 #define __NVME_H__
 
+#include <asm/types.h>
 struct nvme_dev;
 
 /**
diff --git a/include/opensbi.h b/include/opensbi.h
index d812cc8ccd9..8fef4194e21 100644
--- a/include/opensbi.h
+++ b/include/opensbi.h
@@ -8,6 +8,7 @@
 #define OPENSBI_H
 
 /** Expected value of info magic ('OSBI' ascii string in hex) */
+#include <compiler.h>
 #define FW_DYNAMIC_INFO_MAGIC_VALUE		0x4942534f
 
 /** Maximum supported info version */
diff --git a/include/p2sb.h b/include/p2sb.h
index a0f34496dd7..664ecb50b5f 100644
--- a/include/p2sb.h
+++ b/include/p2sb.h
@@ -9,6 +9,7 @@
 
 /* Port Id lives in bits 23:16 and register offset lives in 15:0 of address */
 #include <stdbool.h>
+#include <linux/types.h>
 #define PCR_PORTID_SHIFT	16
 
 /**
diff --git a/include/palmas.h b/include/palmas.h
index 20c7e489c1c..67cc5d3ba27 100644
--- a/include/palmas.h
+++ b/include/palmas.h
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/types.h>
 
 /* I2C chip addresses, TW6035/37 */
 #define TWL603X_CHIP_P1		0x48	/* Page 1 */
diff --git a/include/part.h b/include/part.h
index 55be724d20f..8e06ca99c28 100644
--- a/include/part.h
+++ b/include/part.h
@@ -10,6 +10,7 @@
 #include <ide.h>
 #include <uuid.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 struct block_drvr {
 	char *name;
diff --git a/include/part_efi.h b/include/part_efi.h
index 1929e4400f1..983f6eb2647 100644
--- a/include/part_efi.h
+++ b/include/part_efi.h
@@ -12,7 +12,9 @@
  * http://developer.intel.com/technology/efi/efi.htm
 */
 
+#include <compiler.h>
 #include <linux/compiler.h>
+#include <linux/types.h>
 
 #ifndef _DISK_PART_EFI_H
 #define _DISK_PART_EFI_H
diff --git a/include/pca953x.h b/include/pca953x.h
index aa4401acf0d..30631a9b1f7 100644
--- a/include/pca953x.h
+++ b/include/pca953x.h
@@ -6,6 +6,7 @@
 #ifndef __PCA953X_H_
 #define __PCA953X_H_
 
+#include <linux/types.h>
 #define PCA953X_IN		0x00
 #define PCA953X_OUT		0x01
 #define PCA953X_POL		0x02
diff --git a/include/pca9698.h b/include/pca9698.h
index 48a5f756e28..a2ac8fd4e05 100644
--- a/include/pca9698.h
+++ b/include/pca9698.h
@@ -7,6 +7,7 @@
 #ifndef __PCA9698_H_
 #define __PCA9698_H_
 
+#include <asm/types.h>
 int pca9698_request(unsigned gpio, const char *label);
 void pca9698_free(unsigned gpio);
 int pca9698_direction_input(u8 addr, unsigned gpio);
diff --git a/include/pch.h b/include/pch.h
index aefd2b69f5c..f4a322f51a2 100644
--- a/include/pch.h
+++ b/include/pch.h
@@ -9,6 +9,7 @@
 
 #include <stdbool.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 #define PCH_RCBA		0xf0
 
 #define BIOS_CTRL_BIOSWE	BIT(0)
diff --git a/include/pci.h b/include/pci.h
index eb8981969a6..109c420a6b2 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -503,6 +503,7 @@
 #ifndef __ASSEMBLY__
 
 #include <dm/pci.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_PCI_64BIT
 typedef u64 pci_addr_t;
diff --git a/include/pci_ep.h b/include/pci_ep.h
index 00e8c6d8ab1..fdf620a6e29 100644
--- a/include/pci_ep.h
+++ b/include/pci_ep.h
@@ -12,6 +12,7 @@
 #define _PCI_EP_H
 
 #include <pci.h>
+#include <linux/types.h>
 
 /**
  * enum pci_interrupt_pin - PCI INTx interrupt values
diff --git a/include/pci_rom.h b/include/pci_rom.h
index 895c9627f4d..f4ece59d0f1 100644
--- a/include/pci_rom.h
+++ b/include/pci_rom.h
@@ -6,6 +6,7 @@
 #ifndef _PCI_ROM_H
 #define _PCI_ROM_H
 
+#include <linux/types.h>
 #define PCI_ROM_HDR			0xaa55
 
 struct pci_rom_header {
diff --git a/include/pe.h b/include/pe.h
index 086f2b860e9..e01a786b670 100644
--- a/include/pe.h
+++ b/include/pe.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  *  Portable Executable binary format structures
  *
  *  Copyright (c) 2016 Alexander Graf
diff --git a/include/phy.h b/include/phy.h
index 4cb2117a96a..07ab2c75873 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -18,6 +18,7 @@
 #include <linux/mdio.h>
 #include <log.h>
 #include <phy_interface.h>
+#include <linux/types.h>
 
 #define PHY_FIXED_ID		0xa5a55a5a
 #define PHY_NCSI_ID            0xbeefcafe
diff --git a/include/physmem.h b/include/physmem.h
index 03d3a78b741..bfcc937c25d 100644
--- a/include/physmem.h
+++ b/include/physmem.h
@@ -18,4 +18,5 @@
  *
  * @return	The physical address of the memory which was set.
  */
+#include <asm/types.h>
 phys_addr_t arch_phys_memset(phys_addr_t s, int c, phys_size_t n);
diff --git a/include/post.h b/include/post.h
index cea1a53c4c1..2e47cef039b 100644
--- a/include/post.h
+++ b/include/post.h
@@ -13,6 +13,7 @@
 #ifndef	__ASSEMBLY__
 #include <common.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #if defined(CONFIG_POST)
 
diff --git a/include/power/acpi_pmc.h b/include/power/acpi_pmc.h
index 2993edcdb54..3b14495ce08 100644
--- a/include/power/acpi_pmc.h
+++ b/include/power/acpi_pmc.h
@@ -197,4 +197,5 @@ int pmc_gpe_init(struct udevice *dev);
 #endif /* !__ACPI__ */
 
 #include <stdbool.h>
+#include <linux/types.h>
 #endif
diff --git a/include/power/as3722.h b/include/power/as3722.h
index f5398123f2a..59a6d8bad3b 100644
--- a/include/power/as3722.h
+++ b/include/power/as3722.h
@@ -6,6 +6,7 @@
 #ifndef __POWER_AS3722_H__
 #define __POWER_AS3722_H__
 
+#include <asm/types.h>
 struct udevice;
 
 #define AS3722_GPIO_OUTPUT_VDDH (1 << 0)
diff --git a/include/power/battery.h b/include/power/battery.h
index 1e3d59d76e6..74c63a3b16f 100644
--- a/include/power/battery.h
+++ b/include/power/battery.h
@@ -7,6 +7,7 @@
 #ifndef __POWER_BATTERY_H_
 #define __POWER_BATTERY_H_
 
+#include <linux/types.h>
 struct battery {
 	unsigned int version;
 	unsigned int state_of_chrg;
diff --git a/include/power/fg_battery_cell_params.h b/include/power/fg_battery_cell_params.h
index b8c895bbabb..2575f660cf7 100644
--- a/include/power/fg_battery_cell_params.h
+++ b/include/power/fg_battery_cell_params.h
@@ -70,4 +70,5 @@ u16 cell_character2[16] = {
 	0x0100
 };
 #endif
+#include <asm/types.h>
 #endif /* __FG_BATTERY_CELL_PARAMS_H_ */
diff --git a/include/power/hi6553_pmic.h b/include/power/hi6553_pmic.h
index d0abe207551..2ce9e521f11 100644
--- a/include/power/hi6553_pmic.h
+++ b/include/power/hi6553_pmic.h
@@ -8,6 +8,7 @@
 #define __HI6553_PMIC_H__
 
 /* Registers */
+#include <asm/types.h>
 enum {
 	HI6553_VERSION_REG = 0x000,
 	HI6553_ENABLE2_LDO1_8 = 0x029,
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
index 82fe3509a0b..162b6e3dc88 100644
--- a/include/power/max77686_pmic.h
+++ b/include/power/max77686_pmic.h
@@ -7,6 +7,7 @@
 #ifndef __MAX77686_H_
 #define __MAX77686_H_
 
+#include <linux/types.h>
 #include <power/pmic.h>
 
 enum {
diff --git a/include/power/mc34vr500_pmic.h b/include/power/mc34vr500_pmic.h
index d2edda68905..cff0172e897 100644
--- a/include/power/mc34vr500_pmic.h
+++ b/include/power/mc34vr500_pmic.h
@@ -7,6 +7,7 @@
 #ifndef __MC34VR500_H_
 #define __MC34VR500_H_
 
+#include <linux/types.h>
 #include <power/pmic.h>
 
 #define MC34VR500_I2C_ADDR	0x08
diff --git a/include/power/pmic.h b/include/power/pmic.h
index be9de6b4de7..f88db45999c 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -13,6 +13,7 @@
 #include <dm/ofnode.h>
 #include <i2c.h>
 #include <linux/list.h>
+#include <linux/types.h>
 #include <power/power_chrg.h>
 
 enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
diff --git a/include/power/regulator.h b/include/power/regulator.h
index 6f5b8b058df..f46e09783a5 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -8,6 +8,7 @@
 #define _INCLUDE_REGULATOR_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 struct udevice;
 
 /**
diff --git a/include/power/rk8xx_pmic.h b/include/power/rk8xx_pmic.h
index 8ff0af35c57..0fa03d16b5d 100644
--- a/include/power/rk8xx_pmic.h
+++ b/include/power/rk8xx_pmic.h
@@ -7,6 +7,7 @@
 #ifndef _PMIC_RK8XX_H_
 #define _PMIC_RK8XX_H_
 
+#include <asm/types.h>
 enum {
 	REG_SECONDS			= 0x00,
 	REG_MINUTES,
diff --git a/include/power/s5m8767.h b/include/power/s5m8767.h
index f75ed5d928f..cbfbd91d214 100644
--- a/include/power/s5m8767.h
+++ b/include/power/s5m8767.h
@@ -6,6 +6,7 @@
 #ifndef __S5M8767_H_
 #define __S5M8767_H_
 
+#include <asm/types.h>
 enum s5m8767_regnum {
 	S5M8767_BUCK1 = 0,
 	S5M8767_BUCK2,
diff --git a/include/power/tps65217.h b/include/power/tps65217.h
index 669a94a6c87..2e95397b53b 100644
--- a/include/power/tps65217.h
+++ b/include/power/tps65217.h
@@ -10,6 +10,7 @@
 #define __POWER_TPS65217_H__
 
 /* I2C chip address */
+#include <linux/types.h>
 #define TPS65217_CHIP_PM			0x24
 
 /* Registers */
diff --git a/include/power/tps65218.h b/include/power/tps65218.h
index bb66c3f3ab6..3bd5c1a3688 100644
--- a/include/power/tps65218.h
+++ b/include/power/tps65218.h
@@ -8,6 +8,7 @@
 #define __POWER_TPS65218_H__
 
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 /* I2C chip address */
 #define TPS65218_CHIP_PM			0x24
diff --git a/include/power/tps65910_pmic.h b/include/power/tps65910_pmic.h
index 66214786d3e..f06d9be6b29 100644
--- a/include/power/tps65910_pmic.h
+++ b/include/power/tps65910_pmic.h
@@ -6,6 +6,7 @@
 #ifndef __TPS65910_PMIC_H_
 #define __TPS65910_PMIC_H_
 
+#include <linux/types.h>
 #define TPS65910_I2C_SEL_MASK		(0x1 << 4)
 #define TPS65910_VDD_SR_MASK		(0x1 << 7)
 #define TPS65910_GAIN_SEL_MASK		(0x3 << 6)
diff --git a/include/pwm.h b/include/pwm.h
index 1791afec551..c4280439397 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -11,6 +11,7 @@
 #define _pwm_h_
 
 #include <stdbool.h>
+#include <linux/types.h>
 struct udevice;
 
 /* struct pwm_ops: Operations for the PWM uclass */
diff --git a/include/pxa_lcd.h b/include/pxa_lcd.h
index 11a22abca6d..a8a5f8c2da4 100644
--- a/include/pxa_lcd.h
+++ b/include/pxa_lcd.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  * pxa_lcd.h - PXA LCD Controller structures
  *
  * (C) Copyright 2001
diff --git a/include/qfw.h b/include/qfw.h
index cb56ea58192..44b2d184b9b 100644
--- a/include/qfw.h
+++ b/include/qfw.h
@@ -6,8 +6,10 @@
 #ifndef __FW_CFG__
 #define __FW_CFG__
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 enum qemu_fwcfg_items {
 	FW_CFG_SIGNATURE	= 0x00,
diff --git a/include/ram.h b/include/ram.h
index 273d4153940..3addf70d050 100644
--- a/include/ram.h
+++ b/include/ram.h
@@ -7,6 +7,7 @@
 #ifndef __RAM_H
 #define __RAM_H
 
+#include <linux/types.h>
 struct udevice;
 
 struct ram_info {
diff --git a/include/regmap.h b/include/regmap.h
index 5a3f3dce02c..2995b132f7e 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -10,6 +10,7 @@
 #include <time.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /**
  * DOC: Overview
diff --git a/include/remoteproc.h b/include/remoteproc.h
index c8c286e27f1..bc2722e3c50 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -16,6 +16,7 @@
 #include <stdbool.h>
 #include <dm/platdata.h>	/* For platform data support - non dt world */
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /**
  * enum rproc_mem_type - What type of memory model does the rproc use
diff --git a/include/rng.h b/include/rng.h
index 37af5543631..87e26f5647e 100644
--- a/include/rng.h
+++ b/include/rng.h
@@ -6,6 +6,8 @@
 #if !defined _RNG_H_
 #define _RNG_H_
 
+#include <linux/types.h>
+
 struct udevice;
 
 /**
diff --git a/include/rtc.h b/include/rtc.h
index 5033fde5ac8..e5d29af7332 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -16,6 +16,7 @@
 #include <stdbool.h>
 #include <bcd.h>
 #include <rtc_def.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_DM_RTC
 
diff --git a/include/s_record.h b/include/s_record.h
index 3ece695941d..71105e261fb 100644
--- a/include/s_record.h
+++ b/include/s_record.h
@@ -75,6 +75,7 @@
  *--------------------------------------------------------------------------
  */
 
+#include <linux/types.h>
 #define SREC_START	0	/* Start Record (module name)		    */
 #define SREC_DATA2	1	/* Data  Record with 2 byte address	    */
 #define SREC_DATA3	2	/* Data  Record with 3 byte address	    */
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index 4ff28a1df0e..4bead98a6e4 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -32,6 +32,7 @@ void draw_logo(void);
 char *get_dfu_alt_system(char *interface, char *devstr);
 char *get_dfu_alt_boot(char *interface, char *devstr);
 #endif
+#include <asm/types.h>
 void set_board_type(void);
 void set_board_revision(void);
 const char *get_board_type(void);
diff --git a/include/sandbox-clk.h b/include/sandbox-clk.h
index 296cddfbb0e..eae8673594f 100644
--- a/include/sandbox-clk.h
+++ b/include/sandbox-clk.h
@@ -7,6 +7,8 @@
 #ifndef __SANDBOX_CLK_H__
 #define __SANDBOX_CLK_H__
 
+#include <compiler.h>
+#include <asm/types.h>
 #include <linux/clk-provider.h>
 
 enum {
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index 783dd5c88a7..e311117225f 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -18,6 +18,7 @@
 #ifndef __SANDBOX_FS__
 #define __SANDBOX_FS__
 
+#include <linux/types.h>
 struct blk_desc;
 struct disk_partition;
 
diff --git a/include/sandboxtee.h b/include/sandboxtee.h
index 419643a0246..fc2d1653553 100644
--- a/include/sandboxtee.h
+++ b/include/sandboxtee.h
@@ -7,6 +7,7 @@
 #define __SANDBOXTEE_H
 
 #include <search.h>
+#include <asm/types.h>
 #include <tee/optee_ta_avb.h>
 
 /**
diff --git a/include/sata.h b/include/sata.h
index d89f7a8a298..3a9591e2913 100644
--- a/include/sata.h
+++ b/include/sata.h
@@ -1,6 +1,7 @@
 #ifndef __SATA_H__
 #define __SATA_H__
 #include <part.h>
+#include <linux/types.h>
 
 #if !defined(CONFIG_DM_SCSI) && !defined(CONFIG_AHCI)
 int init_sata(int dev);
diff --git a/include/sdhci.h b/include/sdhci.h
index c47dda8dae3..291a9ca5933 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -9,6 +9,7 @@
 #ifndef __SDHCI_HW_H
 #define __SDHCI_HW_H
 
+#include <compiler.h>
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/types.h>
diff --git a/include/search.h b/include/search.h
index e56843c26fd..35512ca6c6e 100644
--- a/include/search.h
+++ b/include/search.h
@@ -16,6 +16,7 @@
 
 #include <env.h>
 #include <stddef.h>
+#include <linux/types.h>
 
 #define set_errno(val) do { errno = val; } while (0)
 
diff --git a/include/serial.h b/include/serial.h
index ead8bb95b1a..18e4cb5b5bf 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -3,6 +3,7 @@
 
 #include <stdbool.h>
 #include <post.h>
+#include <linux/types.h>
 
 struct serial_device {
 	/* enough bytes to match alignment of following func pointer */
diff --git a/include/sja1000.h b/include/sja1000.h
index 6ceb6f4d48f..2ab0dfdc1b2 100644
--- a/include/sja1000.h
+++ b/include/sja1000.h
@@ -11,6 +11,7 @@
 /*
  * SJA1000 register layout in basic can mode
  */
+#include <asm/types.h>
 struct sja1000_basic_s {
 	u8 cr;
 	u8 cmr;
diff --git a/include/smbios.h b/include/smbios.h
index 97b9ddce237..6ad2234fc77 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -9,6 +9,8 @@
 #define _SMBIOS_H_
 
 /* SMBIOS spec version implemented */
+#include <compiler.h>
+#include <linux/types.h>
 #define SMBIOS_MAJOR_VER	3
 #define SMBIOS_MINOR_VER	0
 
diff --git a/include/smem.h b/include/smem.h
index 598799d3a0c..ea1f0e24c47 100644
--- a/include/smem.h
+++ b/include/smem.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+#include <linux/types.h>
  * The shared memory system is an allocate-only heap structure that
  * consists of one of more memory areas that can be accessed by the processors
  * in the SoC.
diff --git a/include/smsc_lpc47m.h b/include/smsc_lpc47m.h
index 8a972acd4c7..7da8fcab6b5 100644
--- a/include/smsc_lpc47m.h
+++ b/include/smsc_lpc47m.h
@@ -7,6 +7,7 @@
 #define _SMSC_LPC47M_H_
 
 /* I/O address of LPC47M */
+#include <linux/types.h>
 #define LPC47M_IO_PORT	0x2e
 
 /* Logical device number */
diff --git a/include/sort.h b/include/sort.h
index 0c6b588fcb0..8489d066d5f 100644
--- a/include/sort.h
+++ b/include/sort.h
@@ -17,6 +17,7 @@
  *	  0 if element at s1 == element at s2,
  *	> 0 if element at s1 > element at s2,
  */
+#include <linux/types.h>
 void qsort(void *base, size_t nmemb, size_t size,
 	   int (*compar)(const void *s1, const void *s2));
 
diff --git a/include/sound.h b/include/sound.h
index 71bd850652e..55dd6618714 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -7,6 +7,7 @@
 #ifndef __SOUND_H__
 #define __SOUND_H__
 
+#include <linux/types.h>
 /* sound codec enum */
 enum sound_compat {
 	AUDIO_COMPAT_SPI,
diff --git a/include/spi-mem.h b/include/spi-mem.h
index a373b19bf33..8c184abacfc 100644
--- a/include/spi-mem.h
+++ b/include/spi-mem.h
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <spi.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 
 #define SPI_MEM_OP_CMD(__opcode, __buswidth)			\
diff --git a/include/spi.h b/include/spi.h
index 98ba9e796d5..0f4ead08a05 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 /* SPI mode flags */
 #define SPI_CPHA	BIT(0)	/* clock phase (1 = SPI_CLOCK_PHASE_SECOND) */
diff --git a/include/spl.h b/include/spl.h
index c57a047e94a..9cf60463b90 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -8,6 +8,7 @@
 
 #include <binman_sym.h>
 #include <linker_lists.h>
+#include <linux/types.h>
 
 /* Platform-specific defines */
 #include <linux/compiler.h>
diff --git a/include/spl_gpio.h b/include/spl_gpio.h
index e410e62914d..6a63cbab935 100644
--- a/include/spl_gpio.h
+++ b/include/spl_gpio.h
@@ -10,6 +10,7 @@
 #define __SPL_GPIO_H
 
 #include <asm/gpio.h>
+#include <linux/types.h>
 
 /*
  * The functions listed here should be implemented in the SoC GPIO driver.
diff --git a/include/splash.h b/include/splash.h
index 8b70e4a8068..bc8511cce23 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -24,6 +24,7 @@
 
 #include <errno.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 enum splash_storage {
 	SPLASH_STORAGE_NAND,
diff --git a/include/spmi/spmi.h b/include/spmi/spmi.h
index 3242e6bbd07..7e80bf610d1 100644
--- a/include/spmi/spmi.h
+++ b/include/spmi/spmi.h
@@ -2,6 +2,7 @@
 #define _SPMI_SPMI_H
 
 /**
+#include <linux/types.h>
  * struct dm_spmi_ops - SPMI device I/O interface
  *
  * Should be implemented by UCLASS_SPMI device drivers. The standard
diff --git a/include/stm32_rcc.h b/include/stm32_rcc.h
index dc3039d11ac..b5e857e5762 100644
--- a/include/stm32_rcc.h
+++ b/include/stm32_rcc.h
@@ -8,6 +8,7 @@
 #define __STM32_RCC_H_
 
 #include <stdbool.h>
+#include <asm/types.h>
 #define AHB_PSC_1			0
 #define AHB_PSC_2			0x8
 #define AHB_PSC_4			0x9
diff --git a/include/stratixII.h b/include/stratixII.h
index 3c06bb2955a..ece173305ce 100644
--- a/include/stratixII.h
+++ b/include/stratixII.h
@@ -6,6 +6,7 @@
 #ifndef _STRATIXII_H_
 #define _STRATIXII_H_
 
+#include <linux/types.h>
 extern int StratixII_load (Altera_desc * desc, void *image, size_t size);
 extern int StratixII_dump (Altera_desc * desc, void *buf, size_t bsize);
 extern int StratixII_info (Altera_desc * desc);
diff --git a/include/syscon.h b/include/syscon.h
index 3df96e32764..8b276eaa7f2 100644
--- a/include/syscon.h
+++ b/include/syscon.h
@@ -9,6 +9,7 @@
 
 #include <dm/ofnode.h>
 #include <fdtdec.h>
+#include <linux/types.h>
 
 /**
  * struct syscon_uc_info - Information stored by the syscon UCLASS_UCLASS
diff --git a/include/sysreset.h b/include/sysreset.h
index 8bb094d463b..4857aaa3ae4 100644
--- a/include/sysreset.h
+++ b/include/sysreset.h
@@ -7,6 +7,7 @@
 #ifndef __SYSRESET_H
 #define __SYSRESET_H
 
+#include <linux/types.h>
 struct udevice;
 
 enum sysreset_t {
diff --git a/include/tables_csum.h b/include/tables_csum.h
index 5f7edc419ba..5adee2f9475 100644
--- a/include/tables_csum.h
+++ b/include/tables_csum.h
@@ -6,6 +6,7 @@
 #ifndef _TABLES_CSUM_H_
 #define _TABLES_CSUM_H_
 
+#include <asm/types.h>
 static inline u8 table_compute_checksum(void *v, int len)
 {
 	u8 *bytes = v;
diff --git a/include/tca642x.h b/include/tca642x.h
index bda86c1ed88..b75d677d795 100644
--- a/include/tca642x.h
+++ b/include/tca642x.h
@@ -33,6 +33,7 @@ enum {
 };
 #endif
 
+#include <linux/types.h>
 #define TCA642X_OUT_LOW		0
 #define TCA642X_OUT_HIGH	1
 #define TCA642X_POL_NORMAL	0
diff --git a/include/tee.h b/include/tee.h
index a73ec5a48c2..b4ad18e0a88 100644
--- a/include/tee.h
+++ b/include/tee.h
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <linux/bitops.h>
 #include <linux/list.h>
+#include <linux/types.h>
 
 #define TEE_UUID_LEN		16
 
diff --git a/include/tee/optee.h b/include/tee/optee.h
index affa937da08..5c872b4b4f6 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -11,6 +11,7 @@
 
 #include <linux/errno.h>
 #include <image.h>
+#include <linux/types.h>
 
 #define OPTEE_MAGIC             0x4554504f
 #define OPTEE_VERSION           1
diff --git a/include/tegra-kbc.h b/include/tegra-kbc.h
index f331c79c9d5..cf602a004c3 100644
--- a/include/tegra-kbc.h
+++ b/include/tegra-kbc.h
@@ -8,6 +8,7 @@
 #define __include_tegra_kbc_h__
 
 #include <common.h>
+#include <asm/types.h>
 
 #define KEY_IS_MODIFIER(key) ((key) >= KEY_FIRST_MODIFIER)
 
diff --git a/include/test/ut.h b/include/test/ut.h
index 73fd6e50168..d3ec1fcc26c 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -13,6 +13,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct unit_test_state;
 
diff --git a/include/timer.h b/include/timer.h
index a49b500ce35..dc96135de02 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -13,6 +13,7 @@
  *
  * @return - 0 on success or error number
  */
+#include <asm/types.h>
 int dm_timer_init(void);
 
 /*
diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h
index f523d972d06..0b395214525 100644
--- a/include/tlv_eeprom.h
+++ b/include/tlv_eeprom.h
@@ -9,6 +9,7 @@
 
 #include <compiler.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 
diff --git a/include/tpm-common.h b/include/tpm-common.h
index c1309a2735d..b03083408b7 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -8,6 +8,7 @@
 #define __TPM_COMMON_H
 
 #include <command.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/include/tpm-v1.h b/include/tpm-v1.h
index 8f6cc28a9ea..4bd964558d2 100644
--- a/include/tpm-v1.h
+++ b/include/tpm-v1.h
@@ -7,8 +7,10 @@
 #ifndef __TPM_V1_H
 #define __TPM_V1_H
 
+#include <compiler.h>
 #include <tpm-common.h>
 #include <linux/bitops.h>
+#include <linux/types.h>
 
 struct udevice;
 
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 3b2fe449007..601c0e33c8a 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -8,6 +8,7 @@
 #define __TPM_V2_H
 
 #include <tpm-common.h>
+#include <linux/types.h>
 
 #define TPM2_DIGEST_LEN		32
 
diff --git a/include/trace.h b/include/trace.h
index 606dba97689..2bb3afc2689 100644
--- a/include/trace.h
+++ b/include/trace.h
@@ -6,6 +6,7 @@
 #ifndef __TRACE_H
 #define __TRACE_H
 
+#include <linux/types.h>
 enum {
 	/*
 	 * This affects the granularity of our trace. We can bin function
diff --git a/include/tsec.h b/include/tsec.h
index 630c30b6396..474f259d93e 100644
--- a/include/tsec.h
+++ b/include/tsec.h
@@ -13,10 +13,12 @@
 #ifndef __TSEC_H
 #define __TSEC_H
 
+#include <compiler.h>
 #include <net.h>
 #include <config.h>
 #include <phy.h>
 #include <asm/u-boot.h>
+#include <linux/types.h>
 
 #define TSEC_MDIO_REGS_OFFSET	0x520
 
diff --git a/include/twl4030.h b/include/twl4030.h
index c27ad615eeb..119242ba713 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <asm/types.h>
 
 /* I2C chip addresses */
 
diff --git a/include/twl6030.h b/include/twl6030.h
index 41f17de3ab5..29d8baac017 100644
--- a/include/twl6030.h
+++ b/include/twl6030.h
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <asm/types.h>
 
 /* I2C chip addresses */
 #define TWL6030_CHIP_PM		0x48
diff --git a/include/u-boot/aes.h b/include/u-boot/aes.h
index ee686394509..391991c03c2 100644
--- a/include/u-boot/aes.h
+++ b/include/u-boot/aes.h
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <image.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #if IMAGE_ENABLE_ENCRYPT
 int image_aes_encrypt(struct image_cipher_info *info,
diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
index bfd477f31d2..8a007c7827f 100644
--- a/include/u-boot/crc.h
+++ b/include/u-boot/crc.h
@@ -9,6 +9,7 @@
 #define _UBOOT_CRC_H
 
 #include <compiler.h> /* 'uint*' definitions */
+#include <linux/types.h>
 
 /**
  * crc8() - Calculate and return CRC-8 of the data
diff --git a/include/u-boot/rsa-checksum.h b/include/u-boot/rsa-checksum.h
index 54e6a73744e..6d179580f08 100644
--- a/include/u-boot/rsa-checksum.h
+++ b/include/u-boot/rsa-checksum.h
@@ -8,6 +8,7 @@
 
 #include <errno.h>
 #include <image.h>
+#include <linux/types.h>
 #include <u-boot/sha1.h>
 #include <u-boot/sha256.h>
 #include <u-boot/sha512.h>
diff --git a/include/u-boot/rsa-mod-exp.h b/include/u-boot/rsa-mod-exp.h
index 1da8af1bb83..bb2b88a171d 100644
--- a/include/u-boot/rsa-mod-exp.h
+++ b/include/u-boot/rsa-mod-exp.h
@@ -8,6 +8,7 @@
 
 #include <errno.h>
 #include <image.h>
+#include <linux/types.h>
 
 /**
  * struct key_prop - holder for a public key properties
diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h
index 6d5f50a0030..7a572c379d1 100644
--- a/include/u-boot/rsa.h
+++ b/include/u-boot/rsa.h
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <image.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /**
  * struct rsa_public_key - holder for a public key
diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h
index 283f1032936..fc5d257ecc7 100644
--- a/include/u-boot/sha1.h
+++ b/include/u-boot/sha1.h
@@ -18,6 +18,7 @@
 extern "C" {
 #endif
 
+#include <linux/types.h>
 #define SHA1_SUM_POS	-0x20
 #define SHA1_SUM_LEN	20
 #define SHA1_DER_LEN	15
diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h
index 9aa1251789a..d7534c79b56 100644
--- a/include/u-boot/sha256.h
+++ b/include/u-boot/sha256.h
@@ -1,6 +1,7 @@
 #ifndef _SHA256_H
 #define _SHA256_H
 
+#include <linux/types.h>
 #define SHA256_SUM_LEN	32
 #define SHA256_DER_LEN	19
 
diff --git a/include/u-boot/sha512.h b/include/u-boot/sha512.h
index 516729d7750..8551b2ef178 100644
--- a/include/u-boot/sha512.h
+++ b/include/u-boot/sha512.h
@@ -1,6 +1,7 @@
 #ifndef _SHA512_H
 #define _SHA512_H
 
+#include <linux/types.h>
 #define SHA384_SUM_LEN          48
 #define SHA384_DER_LEN          19
 #define SHA512_SUM_LEN          64
diff --git a/include/u-boot/zlib.h b/include/u-boot/zlib.h
index e23ceb50ca0..22bead4b882 100644
--- a/include/u-boot/zlib.h
+++ b/include/u-boot/zlib.h
@@ -336,6 +336,7 @@ typedef uLong FAR uLongf;
 #endif
 
 #  ifdef VMS
+#include <linux/types.h>
 #    include <unixio.h>   /* for off_t */
 #  endif
 #  define z_off_t off_t
diff --git a/include/ubifs_uboot.h b/include/ubifs_uboot.h
index b025779d59f..ac608cf6439 100644
--- a/include/ubifs_uboot.h
+++ b/include/ubifs_uboot.h
@@ -14,6 +14,7 @@
 #ifndef __UBIFS_UBOOT_H__
 #define __UBIFS_UBOOT_H__
 
+#include <linux/types.h>
 struct blk_desc;
 struct disk_partition;
 
diff --git a/include/ubispl.h b/include/ubispl.h
index ecfe0c93c13..1493c07d57a 100644
--- a/include/ubispl.h
+++ b/include/ubispl.h
@@ -5,6 +5,7 @@
 #ifndef __UBOOT_UBISPL_H
 #define __UBOOT_UBISPL_H
 
+#include <asm/types.h>
 #define UBI_VOL_NAME_MAX	127
 
 /*
diff --git a/include/uboot_aes.h b/include/uboot_aes.h
index d2583bed992..5b0b114c8f7 100644
--- a/include/uboot_aes.h
+++ b/include/uboot_aes.h
@@ -21,6 +21,7 @@ typedef unsigned int u32;
  * in this case being AES_BLOCK_LENGTH bytes.
  */
 
+#include <asm/types.h>
 enum {
 	AES_STATECOLS	= 4,	/* columns in the state & expanded key */
 	AES128_KEYCOLS	= 4,	/* columns in a key for aes128 */
diff --git a/include/usb.h b/include/usb.h
index 89b219486c2..721cfb280d0 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -14,6 +14,7 @@
 #include <fdtdec.h>
 #include <stdbool.h>
 #include <usb_defs.h>
+#include <linux/types.h>
 #include <linux/usb/ch9.h>
 #include <asm/cache.h>
 #include <part.h>
diff --git a/include/usb/designware_udc.h b/include/usb/designware_udc.h
index f874e5c35cc..9f06dd6672e 100644
--- a/include/usb/designware_udc.h
+++ b/include/usb/designware_udc.h
@@ -17,6 +17,7 @@
  * 3.  The RX/TX FIFO
  */
 
+#include <asm/types.h>
 #define MAX_ENDPOINTS		16
 
 struct udc_endp_regs {
diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h
index 1d8c624d375..49671c52fd0 100644
--- a/include/usb/dwc2_udc.h
+++ b/include/usb/dwc2_udc.h
@@ -10,6 +10,7 @@
 
 #include <stdbool.h>
 #include <dm/ofnode.h>
+#include <linux/types.h>
 
 #define PHY0_SLEEP              (1 << 5)
 #define DWC2_MAX_HW_ENDPOINTS	16
diff --git a/include/usb/ehci-ci.h b/include/usb/ehci-ci.h
index efb2eec5ce7..a55ab587ef7 100644
--- a/include/usb/ehci-ci.h
+++ b/include/usb/ehci-ci.h
@@ -9,6 +9,7 @@
 #define _EHCI_CI_H
 
 #include <asm/processor.h>
+#include <asm/types.h>
 
 #define CONTROL_REGISTER_W1C_MASK       0x00020000  /* W1C: PHY_CLK_VALID */
 
diff --git a/include/usb/fotg210.h b/include/usb/fotg210.h
index 292ce54e0c4..4b1228e85dc 100644
--- a/include/usb/fotg210.h
+++ b/include/usb/fotg210.h
@@ -9,6 +9,7 @@
 #ifndef _FOTG210_H
 #define _FOTG210_H
 
+#include <linux/types.h>
 struct fotg210_regs {
 	/* USB Host Controller */
 	struct {
diff --git a/include/usb/fusbh200.h b/include/usb/fusbh200.h
index 6ae1d848801..00a7ada90da 100644
--- a/include/usb/fusbh200.h
+++ b/include/usb/fusbh200.h
@@ -9,6 +9,7 @@
 #ifndef _FUSBH200_H
 #define _FUSBH200_H
 
+#include <linux/types.h>
 struct fusbh200_regs {
 	struct {
 		uint32_t data[4];
diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h
index 71642d257b6..53770162964 100644
--- a/include/usb/ulpi.h
+++ b/include/usb/ulpi.h
@@ -18,6 +18,7 @@
 #ifndef __USB_ULPI_H__
 #define __USB_ULPI_H__
 
+#include <linux/types.h>
 #define ULPI_ERROR	(1 << 8) /* overflow from any register value */
 
 #ifndef CONFIG_USB_ULPI_TIMEOUT
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
index 8d9c7917cb8..8e3f2f0b7a5 100644
--- a/include/usb/xhci.h
+++ b/include/usb/xhci.h
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 
 #define MAX_EP_CTX_NUM		31
 #define XHCI_ALIGNMENT		64
diff --git a/include/usb_ether.h b/include/usb_ether.h
index e85acadb7f5..ca11ca1eda3 100644
--- a/include/usb_ether.h
+++ b/include/usb_ether.h
@@ -7,6 +7,7 @@
 #define __USB_ETHER_H__
 
 #include <net.h>
+#include <linux/types.h>
 
 /* TODO(sjg at chromium.org): Remove @pusb_dev when all boards use CONFIG_DM_ETH */
 struct ueth_data {
diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h
index c7b770fa3e8..163c7ce0df0 100644
--- a/include/usb_mass_storage.h
+++ b/include/usb_mass_storage.h
@@ -9,6 +9,7 @@
 
 #define SECTOR_SIZE		0x200
 #include <part.h>
+#include <linux/types.h>
 #include <linux/usb/composite.h>
 
 /* Wait at maximum 60 seconds for cable connection */
diff --git a/include/usbdevice.h b/include/usbdevice.h
index f479724e37b..3a2e651effd 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -18,6 +18,7 @@
 #define __USBDCORE_H__
 
 #include <common.h>
+#include <asm/types.h>
 #include "usbdescriptors.h"
 
 
diff --git a/include/uuid.h b/include/uuid.h
index 73c5a89ec7c..edcdbad06bc 100644
--- a/include/uuid.h
+++ b/include/uuid.h
@@ -6,6 +6,7 @@
 #ifndef __UUID_H__
 #define __UUID_H__
 
+#include <compiler.h>
 #include <linux/bitops.h>
 
 /* This is structure is in big-endian */
diff --git a/include/vbe.h b/include/vbe.h
index 6e71610b8a8..310935baa10 100644
--- a/include/vbe.h
+++ b/include/vbe.h
@@ -10,6 +10,8 @@
 #ifndef _VBE_H
 #define _VBE_H
 
+#include <compiler.h>
+#include <asm/types.h>
 /* these structs are for input from and output to OF */
 #include <stdbool.h>
 struct __packed vbe_screen_info {
diff --git a/include/video.h b/include/video.h
index 03e342c6405..a05beba736c 100644
--- a/include/video.h
+++ b/include/video.h
@@ -244,6 +244,7 @@ static inline int video_sync_copy(struct udevice *dev, void *from, void *to)
 #endif
 
 #include <stdbool.h>
+#include <linux/types.h>
 #endif /* CONFIG_DM_VIDEO */
 
 #ifndef CONFIG_DM_VIDEO
diff --git a/include/video_bridge.h b/include/video_bridge.h
index b47cae66459..a2788759be3 100644
--- a/include/video_bridge.h
+++ b/include/video_bridge.h
@@ -9,6 +9,7 @@
 
 #include <stdbool.h>
 #include <asm/gpio.h>
+#include <asm/types.h>
 
 /**
  * struct video_bridge_priv - uclass information for video bridges
diff --git a/include/video_console.h b/include/video_console.h
index b033dc24b39..7f8791db177 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -8,6 +8,7 @@
 
 #include <video.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct video_priv;
 
diff --git a/include/video_osd.h b/include/video_osd.h
index 01ac94b425c..b68d31219c4 100644
--- a/include/video_osd.h
+++ b/include/video_osd.h
@@ -7,6 +7,7 @@
 #ifndef _VIDEO_OSD_H_
 #define _VIDEO_OSD_H_
 
+#include <linux/types.h>
 struct video_osd_info {
 	/* The width of the OSD display in columns */
 	uint width;
diff --git a/include/virtio.h b/include/virtio.h
index fb8528de283..ccaa3914b97 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -25,6 +25,7 @@
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/typecheck.h>
+#include <linux/types.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/virtio_ring.h b/include/virtio_ring.h
index fff2d180d1b..1f8fa9ecbb3 100644
--- a/include/virtio_ring.h
+++ b/include/virtio_ring.h
@@ -11,6 +11,7 @@
 
 #include <stdbool.h>
 #include <virtio_types.h>
+#include <linux/types.h>
 
 /* This marks a buffer as continuing via the next field */
 #define VRING_DESC_F_NEXT		1
diff --git a/include/vxworks.h b/include/vxworks.h
index c2585e61ced..a67a5a38093 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -8,6 +8,7 @@
 #define _VXWORKS_H_
 
 #include <efi_api.h>
+#include <asm/types.h>
 
 struct bootm_headers;
 struct cmd_tbl;
diff --git a/include/w1-eeprom.h b/include/w1-eeprom.h
index 22337368b4b..53117754694 100644
--- a/include/w1-eeprom.h
+++ b/include/w1-eeprom.h
@@ -9,6 +9,7 @@
 #ifndef __W1_EEPROM_H
 #define __W1_EEPROM_H
 
+#include <asm/types.h>
 struct udevice;
 
 struct w1_eeprom_ops {
diff --git a/include/w1.h b/include/w1.h
index 4c95ef29426..36083fe773c 100644
--- a/include/w1.h
+++ b/include/w1.h
@@ -10,6 +10,7 @@
 
 #include <dm.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 #define W1_FAMILY_DS24B33	0x23
 #define W1_FAMILY_DS2431	0x2d
diff --git a/include/wait_bit.h b/include/wait_bit.h
index 96a97bc327e..c8ea1614c1e 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <watchdog.h>
+#include <asm/types.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/include/wdt.h b/include/wdt.h
index d2ccfbc62ef..3422a539430 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <dm/read.h>
+#include <linux/types.h>
 
 /*
  * Implement a simple watchdog uclass. Watchdog is basically a timer that
diff --git a/include/winbond_w83627.h b/include/winbond_w83627.h
index a58d8169276..139e92be095 100644
--- a/include/winbond_w83627.h
+++ b/include/winbond_w83627.h
@@ -7,6 +7,7 @@
 #define _WINBOND_W83627_H_
 
 /* I/O address of Winbond Super IO chip */
+#include <linux/types.h>
 #define WINBOND_IO_PORT		0x2e
 
 /* Logical device number */
diff --git a/include/xilinx.h b/include/xilinx.h
index ab4537becfa..eb971f01b85 100644
--- a/include/xilinx.h
+++ b/include/xilinx.h
@@ -5,6 +5,7 @@
  */
 
 #include <fpga.h>
+#include <linux/types.h>
 
 #ifndef _XILINX_H_
 #define _XILINX_H_
diff --git a/include/zfs/dmu_objset.h b/include/zfs/dmu_objset.h
index 43aa5824bd4..5392ec0c5d0 100644
--- a/include/zfs/dmu_objset.h
+++ b/include/zfs/dmu_objset.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_DMU_OBJSET_H
 #define	_SYS_DMU_OBJSET_H
 
+#include <linux/types.h>
 #include <zfs/zil.h>
 
 #define OBJSET_PHYS_SIZE	2048
diff --git a/include/zfs/dnode.h b/include/zfs/dnode.h
index f01772c2f95..13bb4496466 100644
--- a/include/zfs/dnode.h
+++ b/include/zfs/dnode.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_DNODE_H
 #define	_SYS_DNODE_H
 
+#include <linux/types.h>
 #include <zfs/spa.h>
 
 /*
diff --git a/include/zfs/dsl_dataset.h b/include/zfs/dsl_dataset.h
index b05be71aa2e..5aac34feca6 100644
--- a/include/zfs/dsl_dataset.h
+++ b/include/zfs/dsl_dataset.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_DSL_DATASET_H
 #define	_SYS_DSL_DATASET_H
 
+#include <linux/types.h>
 typedef struct dsl_dataset_phys {
 	uint64_t ds_dir_obj;
 	uint64_t ds_prev_snap_obj;
diff --git a/include/zfs/dsl_dir.h b/include/zfs/dsl_dir.h
index 7eeb0d8395b..cc804c3a4af 100644
--- a/include/zfs/dsl_dir.h
+++ b/include/zfs/dsl_dir.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_DSL_DIR_H
 #define	_SYS_DSL_DIR_H
 
+#include <linux/types.h>
 typedef struct dsl_dir_phys {
 	uint64_t dd_creation_time; /* not actually used */
 	uint64_t dd_head_dataset_obj;
diff --git a/include/zfs/sa_impl.h b/include/zfs/sa_impl.h
index 41c77b0973a..0028a2b46af 100644
--- a/include/zfs/sa_impl.h
+++ b/include/zfs/sa_impl.h
@@ -10,6 +10,7 @@
 #ifndef	_SYS_SA_IMPL_H
 #define	_SYS_SA_IMPL_H
 
+#include <linux/types.h>
 typedef struct sa_hdr_phys {
 	uint32_t sa_magic;
 	uint16_t sa_layout_info;
diff --git a/include/zfs/spa.h b/include/zfs/spa.h
index cd2ddf58e77..769085e2c30 100644
--- a/include/zfs/spa.h
+++ b/include/zfs/spa.h
@@ -14,6 +14,7 @@
 /*
  * General-purpose 32-bit and 64-bit bitfield encodings.
  */
+#include <linux/types.h>
 #define	BF32_DECODE(x, low, len)	P2PHASE((x) >> (low), 1U << (len))
 #define	BF64_DECODE(x, low, len)	P2PHASE((x) >> (low), 1ULL << (len))
 #define	BF32_ENCODE(x, low, len)	(P2PHASE((x), 1U << (len)) << (low))
diff --git a/include/zfs/uberblock_impl.h b/include/zfs/uberblock_impl.h
index 8045687ba89..97c1af93af9 100644
--- a/include/zfs/uberblock_impl.h
+++ b/include/zfs/uberblock_impl.h
@@ -11,6 +11,7 @@
 #ifndef _SYS_UBERBLOCK_IMPL_H
 #define	_SYS_UBERBLOCK_IMPL_H
 
+#include <linux/types.h>
 #define UBMAX(a, b) ((a) > (b) ? (a) : (b))
 
 /*
diff --git a/include/zfs/vdev_impl.h b/include/zfs/vdev_impl.h
index de0e802f466..7b0ed080e82 100644
--- a/include/zfs/vdev_impl.h
+++ b/include/zfs/vdev_impl.h
@@ -11,6 +11,7 @@
 #ifndef _SYS_VDEV_IMPL_H
 #define	_SYS_VDEV_IMPL_H
 
+#include <linux/types.h>
 #define	VDEV_SKIP_SIZE		(8 << 10)
 #define	VDEV_BOOT_HEADER_SIZE	(8 << 10)
 #define	VDEV_PHYS_SIZE		(112 << 10)
diff --git a/include/zfs/zap_impl.h b/include/zfs/zap_impl.h
index 6fe9fb66f23..cff7f36be37 100644
--- a/include/zfs/zap_impl.h
+++ b/include/zfs/zap_impl.h
@@ -10,6 +10,7 @@
 #ifndef	_SYS_ZAP_IMPL_H
 #define	_SYS_ZAP_IMPL_H
 
+#include <linux/types.h>
 #define	ZAP_MAGIC 0x2F52AB2ABULL
 
 #define	ZAP_HASHBITS		28
diff --git a/include/zfs/zap_leaf.h b/include/zfs/zap_leaf.h
index 2a778e2caf0..5deeae849d0 100644
--- a/include/zfs/zap_leaf.h
+++ b/include/zfs/zap_leaf.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_ZAP_LEAF_H
 #define	_SYS_ZAP_LEAF_H
 
+#include <linux/types.h>
 #define	ZAP_LEAF_MAGIC 0x2AB1EAF
 
 /* chunk size = 24 bytes */
diff --git a/include/zfs/zfs.h b/include/zfs/zfs.h
index 17b93c10c81..9a41c6d0e89 100644
--- a/include/zfs/zfs.h
+++ b/include/zfs/zfs.h
@@ -14,6 +14,7 @@
 /*
  * On-disk version number.
  */
+#include <linux/types.h>
 #define	SPA_VERSION			28ULL
 
 /*
diff --git a/include/zfs/zfs_acl.h b/include/zfs/zfs_acl.h
index d6cc408d7f1..75586393c60 100644
--- a/include/zfs/zfs_acl.h
+++ b/include/zfs/zfs_acl.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_FS_ZFS_ACL_H
 #define	_SYS_FS_ZFS_ACL_H
 
+#include <linux/types.h>
 typedef struct zfs_oldace {
 	uint32_t	z_fuid;		/* "who" */
 	uint32_t	z_access_mask;	/* access mask */
diff --git a/include/zfs/zfs_znode.h b/include/zfs/zfs_znode.h
index ed3cde61650..3df22ea7649 100644
--- a/include/zfs/zfs_znode.h
+++ b/include/zfs/zfs_znode.h
@@ -11,6 +11,7 @@
 #ifndef	_SYS_FS_ZFS_ZNODE_H
 #define	_SYS_FS_ZFS_ZNODE_H
 
+#include <linux/types.h>
 #include <zfs/zfs_acl.h>
 
 #define	MASTER_NODE_OBJ	1
diff --git a/include/zfs/zil.h b/include/zfs/zil.h
index b5bd2c8406d..6e7f32ab650 100644
--- a/include/zfs/zil.h
+++ b/include/zfs/zil.h
@@ -20,6 +20,7 @@
  * each of which contains log records (i.e., transactions) followed by
  * a log block trailer (zil_trailer_t).  The format of a log record
  * depends on the record (or transaction) type, but all records begin
+#include <linux/types.h>
  * with a common structure that defines the type, length, and txg.
  */
 
diff --git a/include/zfs/zio.h b/include/zfs/zio.h
index 959e6e936ad..590dca27810 100644
--- a/include/zfs/zio.h
+++ b/include/zfs/zio.h
@@ -10,6 +10,7 @@
 #ifndef _ZIO_H
 #define	_ZIO_H
 
+#include <linux/types.h>
 #include <zfs/spa.h>
 
 #define	ZEC_MAGIC	0x210da7ab10c7a11ULL	/* zio data bloc tail */
diff --git a/include/zfs/zio_checksum.h b/include/zfs/zio_checksum.h
index 2264374e33a..6caa8aff524 100644
--- a/include/zfs/zio_checksum.h
+++ b/include/zfs/zio_checksum.h
@@ -14,6 +14,7 @@
 /*
  * Signature for checksum functions.
  */
+#include <linux/types.h>
 typedef void zio_checksum_t(const void *data, uint64_t size,
 			    zfs_endian_t endian, zio_cksum_t *zcp);
 
diff --git a/include/zfs_common.h b/include/zfs_common.h
index cb83e59e836..3e2f81cf98c 100644
--- a/include/zfs_common.h
+++ b/include/zfs_common.h
@@ -23,6 +23,7 @@
 #define __ZFS_COMMON__
 
 #include <part.h>
+#include <linux/types.h>
 
 #define SECTOR_SIZE			0x200
 #define SECTOR_BITS			9
diff --git a/include/zynq_bootimg.h b/include/zynq_bootimg.h
index c39c0bf4593..79a4e237b4b 100644
--- a/include/zynq_bootimg.h
+++ b/include/zynq_bootimg.h
@@ -6,6 +6,7 @@
 #ifndef _ZYNQ_BOOTIMG_H_
 #define _ZYNQ_BOOTIMG_H_
 
+#include <asm/types.h>
 #define ZYNQ_MAX_PARTITION_NUMBER	0xE
 
 struct partition_hdr {
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
index 93d771ece26..dee7bc9ae2b 100644
--- a/include/zynqmp_firmware.h
+++ b/include/zynqmp_firmware.h
@@ -8,6 +8,7 @@
 #ifndef _ZYNQMP_FIRMWARE_H_
 #define _ZYNQMP_FIRMWARE_H_
 
+#include <linux/types.h>
 enum pm_api_id {
 	PM_GET_API_VERSION = 1,
 	PM_SET_CONFIGURATION,
diff --git a/include/zynqmp_tap_delay.h b/include/zynqmp_tap_delay.h
index b07e3e06922..71da46beb04 100644
--- a/include/zynqmp_tap_delay.h
+++ b/include/zynqmp_tap_delay.h
@@ -16,4 +16,5 @@ inline void zynqmp_dll_reset(u8 deviceid) {}
 inline void arasan_zynqmp_set_tapdelay(u8 device_id, u8 uhsmode, u8 bank) {}
 #endif
 
+#include <asm/types.h>
 #endif
diff --git a/include/zynqpl.h b/include/zynqpl.h
index d7dc064585e..43a77665428 100644
--- a/include/zynqpl.h
+++ b/include/zynqpl.h
@@ -10,6 +10,7 @@
 #define _ZYNQPL_H_
 
 #include <xilinx.h>
+#include <asm/types.h>
 
 #ifdef CONFIG_CMD_ZYNQ_AES
 int zynq_decrypt_load(u32 srcaddr, u32 dstaddr, u32 srclen, u32 dstlen,
diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c
index b2cbf909361..3af4ed3ba9c 100644
--- a/lib/acpi/acpi_device.c
+++ b/lib/acpi/acpi_device.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <irq.h>
 #include <log.h>
+#include <stdbool.h>
 #include <usb.h>
 #include <vsprintf.h>
 #include <acpi/acpigen.h>
@@ -20,6 +21,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * acpi_device_path_fill() - Find the root device and build a path from there
diff --git a/lib/acpi/acpi_dp.c b/lib/acpi/acpi_dp.c
index 87e7bc4313b..222d85e21e1 100644
--- a/lib/acpi/acpi_dp.c
+++ b/lib/acpi/acpi_dp.c
@@ -13,6 +13,7 @@
 #include <uuid.h>
 #include <acpi/acpigen.h>
 #include <acpi/acpi_dp.h>
+#include <asm/types.h>
 #include <dm/acpi.h>
 #include <linux/errno.h>
 #include <linux/string.h>
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index f0b49c96e7f..f7b0fddb727 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
 {
diff --git a/lib/acpi/acpigen.c b/lib/acpi/acpigen.c
index 3b04aa992e1..ba8fe34b663 100644
--- a/lib/acpi/acpigen.c
+++ b/lib/acpi/acpigen.c
@@ -19,6 +19,7 @@
 #include <dm/acpi.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 u8 *acpigen_get_current(struct acpi_ctx *ctx)
 {
diff --git a/lib/addr_map.c b/lib/addr_map.c
index 09771f3a5a5..c9cbb5c1d1a 100644
--- a/lib/addr_map.c
+++ b/lib/addr_map.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <addr_map.h>
+#include <asm/types.h>
 
 static struct {
 	phys_addr_t paddr;
diff --git a/lib/aes.c b/lib/aes.c
index 204431bcf77..05c177d1643 100644
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -26,6 +26,7 @@
 #include <display_options.h>
 #include <log.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #else
 #include <string.h>
diff --git a/lib/aes/aes-decrypt.c b/lib/aes/aes-decrypt.c
index de67f0f32a7..a3ddb773823 100644
--- a/lib/aes/aes-decrypt.c
+++ b/lib/aes/aes-decrypt.c
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <image.h>
 #include <uboot_aes.h>
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index 1191fc36487..fca637df90f 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <linux/compat.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #else
 #include <linux/export.h>
 #endif
diff --git a/lib/at91/at91.c b/lib/at91/at91.c
index 048597690b1..ebc84810c6d 100644
--- a/lib/at91/at91.c
+++ b/lib/at91/at91.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <atmel_lcd.h>
+#include <linux/types.h>
 
 #include "atmel_logo_8bpp.h"
 #include "microchip_logo_8bpp.h"
diff --git a/lib/bch.c b/lib/bch.c
index 0f68568c60b..c80ab9972ab 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -11,6 +11,7 @@
  * This library provides runtime configurable encoding/decoding of binary
  * Bose-Chaudhuri-Hocquenghem (BCH) codes.
  *
+#include <linux/types.h>
  * Call init_bch to get a pointer to a newly allocated bch_control structure for
  * the given m (Galois field order), t (error correction capability) and
  * (optional) primitive polynomial parameters.
diff --git a/lib/charset.c b/lib/charset.c
index b69e111918a..c57f21e98ba 100644
--- a/lib/charset.c
+++ b/lib/charset.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static struct capitalization_table capitalization_table[] =
 #ifdef CONFIG_EFI_UNICODE_CAPITALIZATION
diff --git a/lib/crc16.c b/lib/crc16.c
index aa6d117ae17..0c5f0c12d22 100644
--- a/lib/crc16.c
+++ b/lib/crc16.c
@@ -27,6 +27,7 @@
 #else
 #include <common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <u-boot/crc.h>
 
diff --git a/lib/crc32.c b/lib/crc32.c
index aa210cea055..85a7f1a6f61 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <compiler.h>
 #include <u-boot/crc.h>
diff --git a/lib/crc32c.c b/lib/crc32c.c
index 016b34a523b..240ca4de662 100644
--- a/lib/crc32c.c
+++ b/lib/crc32c.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <compiler.h>
+#include <linux/types.h>
 
 uint32_t crc32c_cal(uint32_t crc, const char *data, int length,
 		    uint32_t *crc32c_table)
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index d0dd2529536..6d2c1f525b7 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -12,6 +12,7 @@
 #include <keys/asymmetric-subtype.h>
 #include <keys/asymmetric-parser.h>
 #endif
+#include <stdbool.h>
 #include <crypto/public_key.h>
 #ifdef __UBOOT__
 #include <linux/bug.h>
@@ -22,6 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include <linux/seq_file.h>
 #include <linux/module.h>
diff --git a/lib/crypto/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c
index 3cb13fae86d..2395a9ddb1d 100644
--- a/lib/crypto/pkcs7_parser.c
+++ b/lib/crypto/pkcs7_parser.c
@@ -8,11 +8,13 @@
 #define pr_fmt(fmt) "PKCS7: "fmt
 #ifdef __UBOOT__
 #include <log.h>
+#include <stdbool.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #endif
 #include <linux/kernel.h>
 #ifndef __UBOOT__
diff --git a/lib/crypto/pkcs7_verify.c b/lib/crypto/pkcs7_verify.c
index 2d9113fd2e0..9bd19da21cb 100644
--- a/lib/crypto/pkcs7_verify.c
+++ b/lib/crypto/pkcs7_verify.c
@@ -18,6 +18,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/rsa-checksum.h>
 #include <crypto/public_key.h>
 #include <crypto/pkcs7_parser.h>
diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c
index 4b64adbe352..5fa87ce2953 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 <vsprintf.h>
+#include <asm/types.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
 #include <linux/compat.h>
diff --git a/lib/crypto/rsa_helper.c b/lib/crypto/rsa_helper.c
index acea8b26213..e1d86e44664 100644
--- a/lib/crypto/rsa_helper.c
+++ b/lib/crypto/rsa_helper.c
@@ -17,6 +17,7 @@
 #include <crypto/internal/rsa.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
+#include <linux/types.h>
 #include "rsapubkey.asn1.h"
 #ifndef __UBOOT__
 #include "rsaprivkey.asn1.h"
diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c
index 909190c8af8..563fff6ad6d 100644
--- a/lib/crypto/x509_cert_parser.c
+++ b/lib/crypto/x509_cert_parser.c
@@ -19,6 +19,7 @@
 #ifdef __UBOOT__
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #endif
 #include <crypto/public_key.h>
 #ifdef __UBOOT__
diff --git a/lib/crypto/x509_public_key.c b/lib/crypto/x509_public_key.c
index f79b4ea6b0f..e42041c5360 100644
--- a/lib/crypto/x509_public_key.c
+++ b/lib/crypto/x509_public_key.c
@@ -9,12 +9,14 @@
 #ifdef __UBOOT__
 #include <common.h>
 #include <image.h>
+#include <stdbool.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include <linux/module.h>
 #endif
diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c
index 46f7fe89daa..8ced1e0fcf0 100644
--- a/lib/dhry/cmd_dhry.c
+++ b/lib/dhry/cmd_dhry.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 #include "dhry.h"
 
 static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc,
diff --git a/lib/display_options.c b/lib/display_options.c
index 8dcbd75e914..850f5b97243 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -9,12 +9,14 @@
 #include <console.h>
 #include <display_options.h>
 #include <div64.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <version.h>
 #include <vsprintf.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 char *display_options_get_banner_priv(bool newlines, const char *build_tag,
 				      char *buf, int size)
diff --git a/lib/div64.c b/lib/div64.c
index 779d7521f69..32cf6ba91f6 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -21,6 +21,7 @@
 #include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/math64.h>
+#include <linux/types.h>
 
 /* Not needed on 64bit architectures */
 #if BITS_PER_LONG == 32
diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c
index 6ba042f6894..dda21a253df 100644
--- a/lib/efi/efi_info.c
+++ b/lib/efi/efi_info.c
@@ -11,6 +11,7 @@
 #include <mapmem.h>
 #include <asm/global_data.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
 {
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 42b24139dbe..d7c9fcf3004 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -10,12 +10,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <debug_uart.h>
 #include <efi.h>
 #include <efi_api.h>
 #include <errno.h>
 #include <malloc.h>
 #include <ns16550.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/cpu.h>
 #include <asm/io.h>
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index 54f83eee596..607642cc298 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -36,6 +36,7 @@
 #include <dm/device-internal.h>
 #include <dm/root.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 /*
  * EFI attributes of the udevice handled by this driver.
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index 15e1e67bdc9..3b203fc0c4d 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -21,6 +21,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 /**
  * check_node_type() - check node type
diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c
index 87a02d59b9c..1b0118137a3 100644
--- a/lib/efi_loader/efi_acpi.c
+++ b/lib/efi_loader/efi_acpi.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <acpi/acpi_table.h>
 #include <linux/kernel.h>
+#include <linux/types.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 12706e88ab8..47075453771 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -15,6 +15,7 @@
 #include <efi_variable.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const struct efi_boot_services *bs;
 static const struct efi_runtime_services *rs;
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 00dee3e57ae..7e8d9d1efee 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -11,6 +11,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
@@ -19,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/libfdt_env.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <bootm.h>
 #include <pe.h>
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index ae0ee7ee909..770de815378 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -17,6 +17,7 @@
 #include <stdio_dev.h>
 #include <video_console.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define EFI_COUT_MODE_2 2
 #define EFI_MAX_COUT_MODE 3
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 68e344ee344..d117f860b59 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <log.h>
 #include <net.h>
+#include <stdbool.h>
 #include <usb.h>
 #include <mmc.h>
 #include <nvme.h>
@@ -21,6 +22,7 @@
 #include <linux/compat.h> /* U16_MAX */
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SANDBOX
 const efi_guid_t efi_guid_host_dev = U_BOOT_HOST_DEV_GUID;
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index b923ff34848..95541355ff9 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define MAC_OUTPUT_LEN 22
 #define UNKNOWN_OUTPUT_LEN 23
diff --git a/lib/efi_loader/efi_device_path_utilities.c b/lib/efi_loader/efi_device_path_utilities.c
index 405e87f3a01..47aad94edb0 100644
--- a/lib/efi_loader/efi_device_path_utilities.c
+++ b/lib/efi_loader/efi_device_path_utilities.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 const efi_guid_t efi_guid_device_path_utilities_protocol =
 		EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 43704826fb7..dd9c82c0508 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -15,9 +15,11 @@
 #include <log.h>
 #include <part.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct efi_system_partition efi_system_partition;
 
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 023a91a3708..9d21a80bea5 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* GUID for file system information */
 const efi_guid_t efi_file_system_info_guid = EFI_FILE_SYSTEM_INFO_GUID;
diff --git a/lib/efi_loader/efi_freestanding.c b/lib/efi_loader/efi_freestanding.c
index 87c1633804c..ad541ff7e7b 100644
--- a/lib/efi_loader/efi_freestanding.c
+++ b/lib/efi_loader/efi_freestanding.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * memcmp() - compare memory areas
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 42d985b2586..a14a9a96045 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -16,6 +16,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c
index 05ad9926098..fe06e12092b 100644
--- a/lib/efi_loader/efi_hii.c
+++ b/lib/efi_loader/efi_hii.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier:     GPL-2.0+
 /*
+#include <linux/types.h>
  *  EFI Human Interface Infrastructure ... database and packages
  *
  *  Copyright (c) 2017 Leif Lindholm
diff --git a/lib/efi_loader/efi_hii_config.c b/lib/efi_loader/efi_hii_config.c
index 26ea4b9bc0a..4c5a95ef9eb 100644
--- a/lib/efi_loader/efi_hii_config.c
+++ b/lib/efi_loader/efi_hii_config.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier:     GPL-2.0+
 /*
+#include <asm/types.h>
  *  EFI Human Interface Infrastructure ... Configuration
  *
  *  Copyright (c) 2017 Leif Lindholm
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index 44cf7916637..751bebc2a7e 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -8,16 +8,19 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <malloc.h>
 #include <pe.h>
 #include <sort.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <crypto/pkcs7_parser.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
 const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID;
diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c
index 37265417250..253898e7c65 100644
--- a/lib/efi_loader/efi_load_initrd.c
+++ b/lib/efi_loader/efi_load_initrd.c
@@ -13,6 +13,7 @@
 #include <efi_load_initrd.h>
 #include <stdbool.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const efi_guid_t efi_guid_load_file2_protocol =
 		EFI_LOAD_FILE2_PROTOCOL_GUID;
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index b774358333a..ce6fe582d13 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -6,10 +6,12 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <efi_loader.h>
 #include <init.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <watchdog.h>
 #include <asm/cache.h>
@@ -18,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/list_sort.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 5c29d00b451..c884ad5fb5a 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -19,9 +19,11 @@
 #include <efi_loader.h>
 #include <malloc.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.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 974a3ed7281..dec97a2107b 100644
--- a/lib/efi_loader/efi_rng.c
+++ b/lib/efi_loader/efi_rng.c
@@ -4,12 +4,14 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <dm.h>
 #include <efi_loader.h>
 #include <efi_rng.h>
 #include <log.h>
 #include <rng.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c
index 76d18fb1a4a..77d4e6c6c2e 100644
--- a/lib/efi_loader/efi_root_node.c
+++ b/lib/efi_loader/efi_root_node.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <malloc.h>
 #include <efi_loader.h>
 
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 93bbd270234..954138322e1 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <elf.h>
@@ -14,10 +15,12 @@
 #include <log.h>
 #include <malloc.h>
 #include <rtc.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 /* For manual relocation support */
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index d675b96e64f..caa1de8c2cc 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <bootm.h>
+#include <compiler.h>
 #include <efi_loader.h>
 #include <efi_variable.h>
 #include <stdio.h>
diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c
index 0d3b46d7a63..7fc34e236d7 100644
--- a/lib/efi_loader/efi_signature.c
+++ b/lib/efi_loader/efi_signature.c
@@ -15,6 +15,7 @@
 #include <linux/compat.h>
 #include <linux/oid_registry.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/rsa.h>
 #include <u-boot/sha256.h>
 
diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index b77ac76935a..cad38cb5f27 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -11,6 +11,7 @@
 #include <mapmem.h>
 #include <smbios.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static const efi_guid_t smbios_guid = SMBIOS_TABLE_GUID;
 
diff --git a/lib/efi_loader/efi_unicode_collation.c b/lib/efi_loader/efi_unicode_collation.c
index caa65f06d73..fcd295d638b 100644
--- a/lib/efi_loader/efi_unicode_collation.c
+++ b/lib/efi_loader/efi_unicode_collation.c
@@ -11,6 +11,7 @@
 #include <cp437.h>
 #include <efi_loader.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 /* Characters that may not be used in FAT 8.3 file names */
diff --git a/lib/efi_loader/efi_var_common.c b/lib/efi_loader/efi_var_common.c
index 57b27fdc960..59b3829ad7e 100644
--- a/lib/efi_loader/efi_var_common.c
+++ b/lib/efi_loader/efi_var_common.c
@@ -8,8 +8,10 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <efi_variable.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 enum efi_secure_mode {
 	EFI_MODE_SETUP,
diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c
index 3929355b64e..0846bf34f95 100644
--- a/lib/efi_loader/efi_var_file.c
+++ b/lib/efi_loader/efi_var_file.c
@@ -18,6 +18,7 @@
 #include <vsprintf.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 #define PART_STR_LEN 10
diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c
index a8f7dddfc52..49b7b70c7f1 100644
--- a/lib/efi_loader/efi_var_mem.c
+++ b/lib/efi_loader/efi_var_mem.c
@@ -8,8 +8,10 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <efi_variable.h>
+#include <stdbool.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 
 static struct efi_var_file __efi_runtime_data *efi_var_buf;
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index d4b56d05ae6..a1319468b77 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -22,6 +22,7 @@
 #include <crypto/pkcs7_parser.h>
 #include <linux/compat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/crc.h>
 #include <asm/sections.h>
 
diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
index 792aed9c6b3..816bdd49ac2 100644
--- a/lib/efi_loader/efi_variable_tee.c
+++ b/lib/efi_loader/efi_variable_tee.c
@@ -17,6 +17,7 @@
 #include <mm_communication.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static efi_uintn_t max_buffer_size;	/* comm + var + func + data */
 static efi_uintn_t max_payload_size;	/* func + data */
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
index 2598fdfd124..4904970b023 100644
--- a/lib/efi_loader/helloworld.c
+++ b/lib/efi_loader/helloworld.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <efi_api.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 static const efi_guid_t loaded_image_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c
index 5b01610eca1..0ca03cb4a8b 100644
--- a/lib/efi_selftest/efi_selftest.c
+++ b/lib/efi_selftest/efi_selftest.c
@@ -7,6 +7,7 @@
 
 #include <efi_selftest.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 
 /* Constants for test step bitmap */
 #define EFI_ST_SETUP	1
diff --git a/lib/efi_selftest/efi_selftest_bitblt.c b/lib/efi_selftest/efi_selftest_bitblt.c
index fb33150c4b2..49ad2340e5c 100644
--- a/lib/efi_selftest/efi_selftest_bitblt.c
+++ b/lib/efi_selftest/efi_selftest_bitblt.c
@@ -9,6 +9,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 #define WIDTH	200
 #define HEIGHT	120
diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c
index 63d340342a9..44c63dfe32a 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 <linux/string.h>
+#include <linux/types.h>
 #include "efi_selftest_disk_image.h"
 #include <asm/cache.h>
 
diff --git a/lib/efi_selftest/efi_selftest_config_table.c b/lib/efi_selftest/efi_selftest_config_table.c
index 6f6a8757ac5..4ecb41b3c0a 100644
--- a/lib/efi_selftest/efi_selftest_config_table.c
+++ b/lib/efi_selftest/efi_selftest_config_table.c
@@ -9,6 +9,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include <u-boot/crc.h>
 
diff --git a/lib/efi_selftest/efi_selftest_console.c b/lib/efi_selftest/efi_selftest_console.c
index 0462c196c16..993e058c0b9 100644
--- a/lib/efi_selftest/efi_selftest_console.c
+++ b/lib/efi_selftest/efi_selftest_console.c
@@ -9,6 +9,7 @@
 #include <net.h>
 #include <stdarg.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 struct efi_simple_text_output_protocol *con_out;
 struct efi_simple_text_input_protocol *con_in;
diff --git a/lib/efi_selftest/efi_selftest_controllers.c b/lib/efi_selftest/efi_selftest_controllers.c
index 38720bb63d3..13a08eba321 100644
--- a/lib/efi_selftest/efi_selftest_controllers.c
+++ b/lib/efi_selftest/efi_selftest_controllers.c
@@ -11,6 +11,7 @@
  */
 
 #include <efi_selftest.h>
+#include <linux/types.h>
 
 #define NUMBER_OF_CHILD_CONTROLLERS 4
 
diff --git a/lib/efi_selftest/efi_selftest_crc32.c b/lib/efi_selftest/efi_selftest_crc32.c
index 19153c759aa..48f6d328bfb 100644
--- a/lib/efi_selftest/efi_selftest_crc32.c
+++ b/lib/efi_selftest/efi_selftest_crc32.c
@@ -10,6 +10,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include <u-boot/crc.h>
 
 const struct efi_system_table *st;
diff --git a/lib/efi_selftest/efi_selftest_devicepath.c b/lib/efi_selftest/efi_selftest_devicepath.c
index 4ce3fad8959..af0150c7cea 100644
--- a/lib/efi_selftest/efi_selftest_devicepath.c
+++ b/lib/efi_selftest/efi_selftest_devicepath.c
@@ -8,7 +8,9 @@
  * DevicePathToText
  */
 
+#include <compiler.h>
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 static struct efi_boot_services *boottime;
 
diff --git a/lib/efi_selftest/efi_selftest_event_groups.c b/lib/efi_selftest/efi_selftest_event_groups.c
index 6dcde50648b..0aef2aa5e58 100644
--- a/lib/efi_selftest/efi_selftest_event_groups.c
+++ b/lib/efi_selftest/efi_selftest_event_groups.c
@@ -10,6 +10,7 @@
  */
 
 #include <efi_selftest.h>
+#include <linux/types.h>
 
 #define GROUP_SIZE 16
 
diff --git a/lib/efi_selftest/efi_selftest_exception.c b/lib/efi_selftest/efi_selftest_exception.c
index 6e900a35dc2..4bff40c7e73 100644
--- a/lib/efi_selftest/efi_selftest_exception.c
+++ b/lib/efi_selftest/efi_selftest_exception.c
@@ -11,6 +11,7 @@
  */
 
 #include <efi_selftest.h>
+#include <linux/types.h>
 /* Include containing the UEFI application */
 #include "efi_miniapp_file_image_exception.h"
 
diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c
index db94bef0803..4633d416db6 100644
--- a/lib/efi_selftest/efi_selftest_fdt.c
+++ b/lib/efi_selftest/efi_selftest_fdt.c
@@ -13,6 +13,7 @@
 #include <efi_selftest.h>
 #include <stdio.h>
 #include <linux/libfdt.h>
+#include <linux/types.h>
 
 static const struct efi_system_table *systemtab;
 static const struct efi_boot_services *boottime;
diff --git a/lib/efi_selftest/efi_selftest_gop.c b/lib/efi_selftest/efi_selftest_gop.c
index d64294ac79d..de14dbaaeb8 100644
--- a/lib/efi_selftest/efi_selftest_gop.c
+++ b/lib/efi_selftest/efi_selftest_gop.c
@@ -8,6 +8,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 static struct efi_boot_services *boottime;
 static efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
diff --git a/lib/efi_selftest/efi_selftest_hii.c b/lib/efi_selftest/efi_selftest_hii.c
index f4b70f79508..9017d52c50b 100644
--- a/lib/efi_selftest/efi_selftest_hii.c
+++ b/lib/efi_selftest/efi_selftest_hii.c
@@ -8,6 +8,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include "efi_selftest_hii_data.c"
 
 #define PRINT_TESTNAME efi_st_printf("%s:\n", __func__)
diff --git a/lib/efi_selftest/efi_selftest_hii_data.c b/lib/efi_selftest/efi_selftest_hii_data.c
index d19f0682afd..8a2d5d295a4 100644
--- a/lib/efi_selftest/efi_selftest_hii_data.c
+++ b/lib/efi_selftest/efi_selftest_hii_data.c
@@ -19,6 +19,7 @@
  */
 
 #include <efi.h>
+#include <asm/types.h>
 
 #ifdef NOT_USED
 /*
diff --git a/lib/efi_selftest/efi_selftest_load_initrd.c b/lib/efi_selftest/efi_selftest_load_initrd.c
index 144443ff685..00d50005567 100644
--- a/lib/efi_selftest/efi_selftest_load_initrd.c
+++ b/lib/efi_selftest/efi_selftest_load_initrd.c
@@ -41,6 +41,7 @@
 #include <efi_selftest.h>
 #include <efi_loader.h>
 #include <efi_load_initrd.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 static struct efi_boot_services *boottime;
diff --git a/lib/efi_selftest/efi_selftest_loadimage.c b/lib/efi_selftest/efi_selftest_loadimage.c
index f251cbc33bc..add34df4c8a 100644
--- a/lib/efi_selftest/efi_selftest_loadimage.c
+++ b/lib/efi_selftest/efi_selftest_loadimage.c
@@ -10,8 +10,10 @@
  * path and started.
  */
 
+#include <compiler.h>
 #include <efi_selftest.h>
 #include <linux/string.h>
+#include <linux/types.h>
 /* Include containing the efi_selftest_miniapp_exit.efi application */
 #include "efi_miniapp_file_image_exit.h"
 
diff --git a/lib/efi_selftest/efi_selftest_manageprotocols.c b/lib/efi_selftest/efi_selftest_manageprotocols.c
index 717774e00f3..86b3575d703 100644
--- a/lib/efi_selftest/efi_selftest_manageprotocols.c
+++ b/lib/efi_selftest/efi_selftest_manageprotocols.c
@@ -14,6 +14,7 @@
 #include <efi_selftest.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * The test currently does not actually call the interface function.
diff --git a/lib/efi_selftest/efi_selftest_mem.c b/lib/efi_selftest/efi_selftest_mem.c
index c5f0d7ccfa1..fc3cb20e05a 100644
--- a/lib/efi_selftest/efi_selftest_mem.c
+++ b/lib/efi_selftest/efi_selftest_mem.c
@@ -11,6 +11,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 static struct efi_boot_services *boottime;
diff --git a/lib/efi_selftest/efi_selftest_memory.c b/lib/efi_selftest/efi_selftest_memory.c
index 31ca3f3beb6..6e97579ba92 100644
--- a/lib/efi_selftest/efi_selftest_memory.c
+++ b/lib/efi_selftest/efi_selftest_memory.c
@@ -13,6 +13,7 @@
 #include <efi_selftest.h>
 #include <stdbool.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define EFI_ST_NUM_PAGES 8
 
diff --git a/lib/efi_selftest/efi_selftest_miniapp_exit.c b/lib/efi_selftest/efi_selftest_miniapp_exit.c
index 6b5cfb01cf7..a5ab96077f2 100644
--- a/lib/efi_selftest/efi_selftest_miniapp_exit.c
+++ b/lib/efi_selftest/efi_selftest_miniapp_exit.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 static efi_guid_t loaded_image_protocol_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
 
diff --git a/lib/efi_selftest/efi_selftest_rng.c b/lib/efi_selftest/efi_selftest_rng.c
index ecf13a41faf..646654612d9 100644
--- a/lib/efi_selftest/efi_selftest_rng.c
+++ b/lib/efi_selftest/efi_selftest_rng.c
@@ -9,6 +9,7 @@
 
 #include <efi_selftest.h>
 #include <efi_rng.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #define RNG_LEN 9
diff --git a/lib/efi_selftest/efi_selftest_set_virtual_address_map.c b/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
index 6a22d99e834..64e64d20a4e 100644
--- a/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
+++ b/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
@@ -11,6 +11,7 @@
 #include <efi_selftest.h>
 #include <stdbool.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static const struct efi_boot_services *boottime;
 static const struct efi_runtime_services *runtime;
diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c
index 3357048c7f4..c2167c913ce 100644
--- a/lib/efi_selftest/efi_selftest_snp.c
+++ b/lib/efi_selftest/efi_selftest_snp.c
@@ -14,9 +14,11 @@
  *	 we should connect our code as controller.
  */
 
+#include <compiler.h>
 #include <efi_selftest.h>
 #include <net.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * MAC address for broadcasts
diff --git a/lib/efi_selftest/efi_selftest_startimage_exit.c b/lib/efi_selftest/efi_selftest_startimage_exit.c
index 1406dfc9172..a7d5f201be8 100644
--- a/lib/efi_selftest/efi_selftest_startimage_exit.c
+++ b/lib/efi_selftest/efi_selftest_startimage_exit.c
@@ -11,6 +11,7 @@
 
 #include <efi_selftest.h>
 #include <linux/string.h>
+#include <linux/types.h>
 /* Include containing the miniapp.efi application */
 #include "efi_miniapp_file_image_exit.h"
 
diff --git a/lib/efi_selftest/efi_selftest_startimage_return.c b/lib/efi_selftest/efi_selftest_startimage_return.c
index fabf53d983b..216890a094f 100644
--- a/lib/efi_selftest/efi_selftest_startimage_return.c
+++ b/lib/efi_selftest/efi_selftest_startimage_return.c
@@ -10,6 +10,7 @@
  */
 
 #include <efi_selftest.h>
+#include <linux/types.h>
 /* Include containing the miniapp.efi application */
 #include "efi_miniapp_file_image_return.h"
 
diff --git a/lib/efi_selftest/efi_selftest_textinputex.c b/lib/efi_selftest/efi_selftest_textinputex.c
index 2b0b3cfd722..1dee1cffb62 100644
--- a/lib/efi_selftest/efi_selftest_textinputex.c
+++ b/lib/efi_selftest/efi_selftest_textinputex.c
@@ -14,6 +14,7 @@
 
 #include <efi_selftest.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 static const efi_guid_t text_input_ex_protocol_guid =
 		EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selftest/efi_selftest_textoutput.c
index a87f65e197f..8b37957ebf3 100644
--- a/lib/efi_selftest/efi_selftest_textoutput.c
+++ b/lib/efi_selftest/efi_selftest_textoutput.c
@@ -11,6 +11,7 @@
  */
 
 #include <efi_selftest.h>
+#include <linux/types.h>
 
 /*
  * Execute unit test.
diff --git a/lib/efi_selftest/efi_selftest_unaligned.c b/lib/efi_selftest/efi_selftest_unaligned.c
index 1802948e675..3a55d57fbeb 100644
--- a/lib/efi_selftest/efi_selftest_unaligned.c
+++ b/lib/efi_selftest/efi_selftest_unaligned.c
@@ -8,6 +8,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 struct aligned_buffer {
 	char a[8] __aligned(8);
diff --git a/lib/efi_selftest/efi_selftest_unicode_collation.c b/lib/efi_selftest/efi_selftest_unicode_collation.c
index b3f7c623e8b..b60d8a94ca5 100644
--- a/lib/efi_selftest/efi_selftest_unicode_collation.c
+++ b/lib/efi_selftest/efi_selftest_unicode_collation.c
@@ -9,6 +9,7 @@
 
 #include <efi_selftest.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 static const efi_guid_t unicode_collation_protocol_guid =
 	EFI_UNICODE_COLLATION_PROTOCOL2_GUID;
diff --git a/lib/efi_selftest/efi_selftest_util.c b/lib/efi_selftest/efi_selftest_util.c
index ea73c25220f..1f4d248eeec 100644
--- a/lib/efi_selftest/efi_selftest_util.c
+++ b/lib/efi_selftest/efi_selftest_util.c
@@ -8,6 +8,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 
 struct efi_st_translate {
 	u16 code;
diff --git a/lib/efi_selftest/efi_selftest_variables.c b/lib/efi_selftest/efi_selftest_variables.c
index dfbdeb99f31..8de971ea364 100644
--- a/lib/efi_selftest/efi_selftest_variables.c
+++ b/lib/efi_selftest/efi_selftest_variables.c
@@ -9,6 +9,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #define EFI_ST_MAX_DATA_SIZE 16
diff --git a/lib/efi_selftest/efi_selftest_variables_runtime.c b/lib/efi_selftest/efi_selftest_variables_runtime.c
index 619da67a292..b232f07a3c4 100644
--- a/lib/efi_selftest/efi_selftest_variables_runtime.c
+++ b/lib/efi_selftest/efi_selftest_variables_runtime.c
@@ -10,6 +10,7 @@
  */
 
 #include <efi_selftest.h>
+#include <asm/types.h>
 #include <linux/string.h>
 
 #define EFI_ST_MAX_DATA_SIZE 16
diff --git a/lib/efi_selftest/efi_selftest_watchdog.c b/lib/efi_selftest/efi_selftest_watchdog.c
index 666c0309be1..97790eaa6af 100644
--- a/lib/efi_selftest/efi_selftest_watchdog.c
+++ b/lib/efi_selftest/efi_selftest_watchdog.c
@@ -18,6 +18,7 @@
 
 #include <efi_selftest.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 /*
  * This is the communication structure for the notification function.
diff --git a/lib/elf.c b/lib/elf.c
index 623e46867cd..2b681d9c0cb 100644
--- a/lib/elf.c
+++ b/lib/elf.c
@@ -18,6 +18,7 @@
 #endif
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * A very simple ELF64 loader, assumes the image is valid, returns the
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index ee8ae8d2764..655e0786e8a 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -6,6 +6,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <boot_fit.h>
+#include <compiler.h>
 #include <display_options.h>
 #include <dm.h>
 #include <hang.h>
@@ -13,6 +14,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/u-boot.h>
@@ -32,6 +34,7 @@
 #include <linux/ctype.h>
 #include <linux/lzo.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index 15c60ee08cf..a1cd2c1e9f1 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <os.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* The size of our test fdt blob */
 #define FDT_SIZE	(16 * 1024)
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 60429e5dd7e..24cce8ffc7b 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <blk.h>
 #include <command.h>
+#include <compiler.h>
 #include <console.h>
 #include <div64.h>
 #include <gzip.h>
@@ -14,6 +15,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <stdio.h>
+#include <asm/types.h>
 #include <linux/string.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
diff --git a/lib/hashtable.c b/lib/hashtable.c
index c5581800d65..fdc18a06eca 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef USE_HOSTCC		/* HOST build */
 # include <string.h>
diff --git a/lib/hexdump.c b/lib/hexdump.c
index 74940dd0249..7b3fb2c5ca3 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <hexdump.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/ctype.h>
@@ -17,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/log2.h>
 #include <asm/unaligned.h>
+#include <linux/types.h>
 
 const char hex_asc[] = "0123456789abcdef";
 const char hex_asc_upper[] = "0123456789ABCDEF";
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 24741b8d8ec..c57fefbf508 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -46,6 +46,7 @@
 #include <stdio.h>
 #include <asm/cache.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <linux/math64.h>
 
diff --git a/lib/libavb/avb_sysdeps.h b/lib/libavb/avb_sysdeps.h
index 85ff8e1de3e..4af0a84cf15 100644
--- a/lib/libavb/avb_sysdeps.h
+++ b/lib/libavb/avb_sysdeps.h
@@ -21,6 +21,7 @@ extern "C" {
  */
 #include <common.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 /* If you don't have gcc or clang, these attribute macros may need to
  * be adjusted.
diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c
index 030d21fc2b9..b08161a0af9 100644
--- a/lib/libavb/avb_sysdeps_posix.c
+++ b/lib/libavb/avb_sysdeps_posix.c
@@ -10,6 +10,7 @@
 #include <stdlib.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "avb_sysdeps.h"
 
diff --git a/lib/linux_compat.c b/lib/linux_compat.c
index 8b9b562f98e..b70290d7fda 100644
--- a/lib/linux_compat.c
+++ b/lib/linux_compat.c
@@ -5,6 +5,7 @@
 #include <asm/cache.h>
 #include <linux/compat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 struct p_current cur = {
 	.pid = 1,
diff --git a/lib/linux_string.c b/lib/linux_string.c
index d5a5e08d98c..ee6a5856a2f 100644
--- a/lib/linux_string.c
+++ b/lib/linux_string.c
@@ -10,6 +10,7 @@
 
 #include <linux/ctype.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * skip_spaces - Removes leading whitespace from @str.
diff --git a/lib/lmb.c b/lib/lmb.c
index 4568adb1a95..e9a946e5659 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <image.h>
 #include <lmb.h>
 #include <log.h>
@@ -14,6 +15,7 @@
 #include <stdio.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #define LMB_ALLOC_ANYWHERE	0
 
diff --git a/lib/lz4.c b/lib/lz4.c
index e803c087a26..628909a059c 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -9,6 +9,7 @@
 */
 
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**************************************
 *  Reading and writing into memory
diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c
index 4f45f80fe26..cc400b6826e 100644
--- a/lib/lzma/LzmaDec.c
+++ b/lib/lzma/LzmaDec.c
@@ -4,6 +4,7 @@
 #include <config.h>
 #include <common.h>
 #include <watchdog.h>
+#include <linux/types.h>
 #include "LzmaDec.h"
 
 #include <linux/string.h>
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 5ce03bbbb75..8cb61c056ef 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -22,6 +22,7 @@
 #include <log.h>
 #include <watchdog.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_LZMA
 
diff --git a/lib/lzma/Types.h b/lib/lzma/Types.h
index 8afcba556eb..04d85e1d4fe 100644
--- a/lib/lzma/Types.h
+++ b/lib/lzma/Types.h
@@ -5,6 +5,7 @@
 #define __7Z_TYPES_H
 
 #include <stddef.h>
+#include <linux/types.h>
 
 #ifdef _WIN32
 #include <windows.h>
diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c
index 393f31566bd..ca38a3e5956 100644
--- a/lib/lzo/lzo1x_decompress.c
+++ b/lib/lzo/lzo1x_decompress.c
@@ -18,6 +18,7 @@
 #include <asm/byteorder.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "lzodefs.h"
 
 #define HAVE_IP(x, ip_end, ip) ((size_t)(ip_end - ip) < (x))
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
index b6d482c492e..c73bb717474 100644
--- a/lib/lzo/lzodefs.h
+++ b/lib/lzo/lzodefs.h
@@ -11,6 +11,7 @@
  *  Richard Purdie <rpurdie at openedhand.com>
  */
 
+#include <linux/types.h>
 #define LZO_VERSION		0x2020
 #define LZO_VERSION_STRING	"2.02"
 #define LZO_VERSION_DATE	"Oct 17 2005"
diff --git a/lib/membuff.c b/lib/membuff.c
index 94f6e25e826..b5a271bb810 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -10,9 +10,11 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "membuff.h"
 
 void membuff_purge(struct membuff *mb)
diff --git a/lib/net_utils.c b/lib/net_utils.c
index eb2d52e849b..3df5a1097a1 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 
 struct in_addr string_to_ip(const char *s)
 {
diff --git a/lib/of_live.c b/lib/of_live.c
index 208f6ada571..d2b3f3bf772 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <stdbool.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/libfdt.h>
@@ -18,6 +19,7 @@
 #include <dm/of_access.h>
 #include <linux/err.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 static void *unflatten_dt_alloc(void **mem, unsigned long size,
 				unsigned long align)
diff --git a/lib/oid_registry.c b/lib/oid_registry.c
index 5846030ac13..779c28e7aca 100644
--- a/lib/oid_registry.c
+++ b/lib/oid_registry.c
@@ -8,6 +8,7 @@
 #ifdef __UBOOT__
 #include <vsprintf.h>
 #include <linux/compat.h>
+#include <linux/types.h>
 #else
 #include <linux/module.h>
 #include <linux/export.h>
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index 8493ca6c621..8377ff6f5bd 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -13,6 +13,7 @@
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <tee/optee.h>
 
 #define optee_hdr_err_msg \
diff --git a/lib/physmem.c b/lib/physmem.c
index 43f034766ab..80bbc5ef5d1 100644
--- a/lib/physmem.c
+++ b/lib/physmem.c
@@ -9,11 +9,13 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <log.h>
 #include <mapmem.h>
 #include <physmem.h>
 #include <linux/compiler.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 phys_addr_t __weak arch_phys_memset(phys_addr_t s, int c, phys_size_t n)
 {
diff --git a/lib/rsa/rsa-checksum.c b/lib/rsa/rsa-checksum.c
index e60debb7df3..2e7f8c4a176 100644
--- a/lib/rsa/rsa-checksum.c
+++ b/lib/rsa/rsa-checksum.c
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <asm/unaligned.h>
 #include <hash.h>
+#include <linux/types.h>
 #else
 #include "fdt_host.h"
 #endif
diff --git a/lib/rsa/rsa-keyprop.c b/lib/rsa/rsa-keyprop.c
index e5ece615245..e0347615f76 100644
--- a/lib/rsa/rsa-keyprop.c
+++ b/lib/rsa/rsa-keyprop.c
@@ -16,6 +16,7 @@
 #include <crypto/internal/rsa.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/rsa-mod-exp.h>
 
 /**
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index d8cd3ecd88d..0f87bd3ac05 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -13,6 +13,7 @@
 #include <asm/types.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include "fdt_host.h"
 #include "mkimage.h"
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index c894e7a6b9b..d5eb2e92ec0 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -17,6 +17,7 @@
 #include <asm/unaligned.h>
 #include <dm.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include "fdt_host.h"
 #include "mkimage.h"
diff --git a/lib/sha1.c b/lib/sha1.c
index 8154e1e1350..bc77828df3f 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -19,6 +19,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include <string.h>
 #endif /* USE_HOSTCC */
diff --git a/lib/sha256.c b/lib/sha256.c
index c1fe93de012..53ab648155b 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -8,6 +8,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include <string.h>
 #endif /* USE_HOSTCC */
diff --git a/lib/sha512.c b/lib/sha512.c
index f1e2acf0fbc..e18fd78519a 100644
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -13,6 +13,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #else
 #include <string.h>
 #endif /* USE_HOSTCC */
diff --git a/lib/smbios.c b/lib/smbios.c
index 73cd07b599e..8a133fec68e 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -19,6 +19,7 @@
 #endif
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /**
  * smbios_add_string() - add a string to the string area
diff --git a/lib/strto.c b/lib/strto.c
index 9636c797ea5..3c5b099b992 100644
--- a/lib/strto.c
+++ b/lib/strto.c
@@ -15,6 +15,7 @@
 #include <linux/ctype.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /* from lib/kstrtox.c */
 static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base)
diff --git a/lib/tables_csum.c b/lib/tables_csum.c
index e2630d57d91..4b8470230a7 100644
--- a/lib/tables_csum.c
+++ b/lib/tables_csum.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/ctype.h>
 
 u8 table_compute_checksum(void *v, int len)
diff --git a/lib/time.c b/lib/time.c
index 733beb7dcc2..bbda9f421ac 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #ifndef CONFIG_WD_PERIOD
 # define CONFIG_WD_PERIOD	(10 * 1000 * 1000)	/* 10 seconds default */
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 9e16f535063..6acfd100829 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/ctype.h>
+#include <linux/types.h>
 
 struct printf_info {
 	char *bf;	/* Digit buffer */
diff --git a/lib/tizen/tizen.c b/lib/tizen/tizen.c
index 916b2597569..03b2f6235a1 100644
--- a/lib/tizen/tizen.c
+++ b/lib/tizen/tizen.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <lcd.h>
 #include <libtizen.h>
+#include <linux/types.h>
 
 #include "tizen_logo_16bpp.h"
 #include "tizen_logo_16bpp_gzip.h"
diff --git a/lib/tpm-common.c b/lib/tpm-common.c
index 93bcab46112..10d4164f581 100644
--- a/lib/tpm-common.c
+++ b/lib/tpm-common.c
@@ -14,6 +14,7 @@
 #include <asm/unaligned.h>
 #include <tpm-common.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tpm-utils.h"
 
 enum tpm_version tpm_get_version(struct udevice *dev)
diff --git a/lib/tpm-utils.h b/lib/tpm-utils.h
index d680d140884..656886fa949 100644
--- a/lib/tpm-utils.h
+++ b/lib/tpm-utils.h
@@ -7,6 +7,7 @@
 #ifndef __TPM_UTILS_H
 #define __TPM_UTILS_H
 
+#include <linux/types.h>
 #define COMMAND_BUFFER_SIZE 256
 
 /* Internal error of TPM command library */
diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
index c3f9dde9e86..772111e97db 100644
--- a/lib/tpm-v1.c
+++ b/lib/tpm-v1.c
@@ -12,6 +12,7 @@
 #include <asm/unaligned.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <u-boot/sha1.h>
 #include <tpm-common.h>
 #include <tpm-v1.h>
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index d278acfb436..bb868f20e56 100644
--- a/lib/tpm-v2.c
+++ b/lib/tpm-v2.c
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "tpm-utils.h"
 
 u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
diff --git a/lib/trace.c b/lib/trace.c
index 8f666133caa..30bf819e7fc 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -15,6 +15,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/uuid.c b/lib/uuid.c
index 3111318808c..d6b1f69a61d 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * UUID - Universally Unique IDentifier - 128 bits unique number.
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index c8f663cf4da..80cfdebbc50 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -19,6 +19,7 @@
 #include <div64.h>
 #include <hexdump.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <uuid.h>
 #include <vsprintf.h>
diff --git a/lib/xxhash.c b/lib/xxhash.c
index 2fb4dc6d02b..1f54d75381c 100644
--- a/lib/xxhash.c
+++ b/lib/xxhash.c
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/compat.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/xxhash.h>
 
 /*-*************************************
diff --git a/lib/zstd/zstd_opt.h b/lib/zstd/zstd_opt.h
index 25f78bdba24..0fbe8ec1294 100644
--- a/lib/zstd/zstd_opt.h
+++ b/lib/zstd/zstd_opt.h
@@ -10,6 +10,7 @@
 #define ZSTD_OPT_H_91842398743
 
 #include <linux/string.h>
+#include <linux/types.h>
 #define ZSTD_LITFREQ_ADD 2
 #define ZSTD_FREQ_DIV 4
 #define ZSTD_MAX_PRICE (1 << 30)
diff --git a/net/arp.c b/net/arp.c
index aaf5d3c27fd..95b1c0fbf0a 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -19,6 +19,7 @@
 #include <vsprintf.h>
 #include <linux/delay.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "arp.h"
 
diff --git a/net/arp.h b/net/arp.h
index 25b3c00d5c5..b5544783f76 100644
--- a/net/arp.h
+++ b/net/arp.h
@@ -13,6 +13,7 @@
 #define __ARP_H__
 
 #include <common.h>
+#include <linux/types.h>
 
 extern struct in_addr net_arp_wait_packet_ip;
 /* MAC address of waiting packet's destination */
diff --git a/net/bootp.c b/net/bootp.c
index 6fde55fe862..582755b2cae 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <net.h>
 #include <rand.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <uuid.h>
@@ -23,6 +24,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_LED_STATUS
diff --git a/net/bootp.h b/net/bootp.h
index 567340ec5d4..99ed7dfe994 100644
--- a/net/bootp.h
+++ b/net/bootp.h
@@ -25,6 +25,7 @@
 extern u8 *dhcp_vendorex_prep(u8 *e); /*rtn new e after add own opts. */
 extern u8 *dhcp_vendorex_proc(u8 *e); /*rtn next e if mine,else NULL  */
 #endif
+#include <asm/types.h>
 #else
 #define OPT_FIELD_SIZE 64
 #endif
diff --git a/net/cdp.c b/net/cdp.c
index ffb91a64900..98ac9782795 100644
--- a/net/cdp.c
+++ b/net/cdp.c
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "cdp.h"
 
diff --git a/net/cdp.h b/net/cdp.h
index 16ccbf4b59e..476c9bf17a7 100644
--- a/net/cdp.h
+++ b/net/cdp.h
@@ -14,6 +14,7 @@
 #ifndef __CDP_H__
 #define __CDP_H__
 
+#include <linux/types.h>
 void cdp_start(void);
 /* Process a received CDP packet */
 void cdp_receive(const uchar *pkt, unsigned len);
diff --git a/net/dns.c b/net/dns.c
index c86e519c3c7..e27cf256e08 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -31,6 +31,7 @@
 #include <time.h>
 #include <asm/unaligned.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "dns.h"
 
diff --git a/net/dns.h b/net/dns.h
index 79ac76f590d..755b5c1805b 100644
--- a/net/dns.h
+++ b/net/dns.h
@@ -7,6 +7,7 @@
 #ifndef __DNS_H__
 #define __DNS_H__
 
+#include <linux/types.h>
 #define DNS_SERVICE_PORT 53
 #define DNS_TIMEOUT      10000UL
 
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 05f35cdfb5f..4ace57fefe7 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -19,6 +19,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/pcap.h>
 #include "eth_internal.h"
 #include <eth_phy.h>
diff --git a/net/eth_common.c b/net/eth_common.c
index 5e8276b9bce..822c6440379 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <vsprintf.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "eth_internal.h"
 
 int eth_env_get_enetaddr_by_index(const char *base_name, int index,
diff --git a/net/eth_internal.h b/net/eth_internal.h
index faff0ef8667..444629cdd8d 100644
--- a/net/eth_internal.h
+++ b/net/eth_internal.h
@@ -9,6 +9,7 @@
 #define __ETH_INTERNAL_H
 
 /* Do init that is common to driver model and legacy networking */
+#include <linux/types.h>
 void eth_common_init(void);
 
 /**
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index c5522f974c7..2d4aa3f628a 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/pcap.h>
 #include "eth_internal.h"
 
diff --git a/net/fastboot.c b/net/fastboot.c
index b6006ddd2a9..d23a225d43d 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -5,13 +5,16 @@
 
 #include <common.h>
 #include <command.h>
+#include <compiler.h>
 #include <fastboot.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/fastboot.h>
 
 /* Fastboot port # defined in spec */
diff --git a/net/mdio-mux-uclass.c b/net/mdio-mux-uclass.c
index 5766c33ebbd..ec4e9bbfc64 100644
--- a/net/mdio-mux-uclass.c
+++ b/net/mdio-mux-uclass.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <miiphy.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 #include <dm/lists.h>
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 3e39a9b74f8..3e241057ca1 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <asm/types.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/uclass-internal.h>
diff --git a/net/net.c b/net/net.c
index 1689f00c002..43cc81555d9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -103,6 +103,7 @@
 #include <vsprintf.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/fastboot.h>
 #include <net/tftp.h>
 #if defined(CONFIG_CMD_PCAP)
diff --git a/net/nfs.c b/net/nfs.c
index 76ff7d32e0b..7c305de325d 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -9,6 +9,7 @@
  * large portions are copied verbatim) as distributed in OSKit 0.97.  A few
  * changes were necessary to adapt the code to Etherboot and to fix several
  * inconsistencies.  Also the RPC message preparation is done "by hand" to
+#include <linux/types.h>
  * avoid adding netsprintf() which I find hard to understand and use.  */
 
 /* NOTE 2: Etherboot does not care about things beyond the kernel image, so
diff --git a/net/nfs.h b/net/nfs.h
index 68ada0efeb9..8a2d443677e 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -6,6 +6,7 @@
 #ifndef __NFS_H__
 #define __NFS_H__
 
+#include <linux/types.h>
 #define SUNRPC_PORT     111
 
 #define PROG_PORTMAP    100000
diff --git a/net/pcap.c b/net/pcap.c
index 4ddc55801d7..da2903b80f8 100644
--- a/net/pcap.c
+++ b/net/pcap.c
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/pcap.h>
 #include <time.h>
 #include <asm/io.h>
diff --git a/net/rarp.c b/net/rarp.c
index 28abc8a4bcf..cdbdb73835b 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -10,6 +10,7 @@
 #include <net.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/tftp.h>
 #include "nfs.h"
 #include "bootp.h"
diff --git a/net/sntp.c b/net/sntp.c
index 9968984eece..11df1db6a10 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -14,6 +14,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #include "sntp.h"
 
diff --git a/net/sntp.h b/net/sntp.h
index d3cbfbc69a6..613d7a87b22 100644
--- a/net/sntp.h
+++ b/net/sntp.h
@@ -6,6 +6,7 @@
 #ifndef __SNTP_H__
 #define __SNTP_H__
 
+#include <linux/types.h>
 #define NTP_SERVICE_PORT	123
 #define SNTP_PACKET_LEN		48
 
diff --git a/net/tftp.c b/net/tftp.c
index be1ff2cd9d4..949d1227f38 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -16,12 +16,14 @@
 #include <log.h>
 #include <mapmem.h>
 #include <net.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_SYS_DIRECT_FLASH_TFTP
diff --git a/net/wol.c b/net/wol.c
index e985f4adc59..9a008c84974 100644
--- a/net/wol.c
+++ b/net/wol.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <net.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include "wol.h"
 
 static ulong wol_timeout = WOL_DEFAULT_TIMEOUT;
diff --git a/net/wol.h b/net/wol.h
index ebc81f24b6e..828f65367ac 100644
--- a/net/wol.h
+++ b/net/wol.h
@@ -15,6 +15,7 @@
 #define __WOL_H__
 
 #include <net.h>
+#include <linux/types.h>
 
 /**********************************************************************/
 
diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c
index 2d2849ee4f1..a6e1dbad7a9 100644
--- a/post/cpu/mpc83xx/ecc.c
+++ b/post/cpu/mpc83xx/ecc.c
@@ -17,6 +17,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <post.h>
+#include <asm/types.h>
 #include <asm/u-boot.h>
 
 #if CONFIG_POST & CONFIG_SYS_POST_ECC
diff --git a/post/drivers/flash.c b/post/drivers/flash.c
index 721d48eb6b3..d1af27c654f 100644
--- a/post/drivers/flash.c
+++ b/post/drivers/flash.c
@@ -12,6 +12,7 @@
 #include <flash.h>
 #include <stdio.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #if CONFIG_POST & CONFIG_SYS_POST_FLASH
 
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index e8cded75223..19695276be4 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -9,6 +9,7 @@
 #include <asm/global_data.h>
 #include <asm/u-boot.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /* Memory test
  *
diff --git a/post/drivers/rtc.c b/post/drivers/rtc.c
index 7f14670317c..dbdccacf270 100644
--- a/post/drivers/rtc.c
+++ b/post/drivers/rtc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <time.h>
+#include <linux/types.h>
 
 /*
  * RTC test
diff --git a/post/lib_powerpc/andi.c b/post/lib_powerpc/andi.c
index cea61eb87a6..e2abcaead7b 100644
--- a/post/lib_powerpc/andi.c
+++ b/post/lib_powerpc/andi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/b.c b/post/lib_powerpc/b.c
index 0b02e9169e2..dba7098f30a 100644
--- a/post/lib_powerpc/b.c
+++ b/post/lib_powerpc/b.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/cmp.c b/post/lib_powerpc/cmp.c
index bcfd1892991..508b9c08ae4 100644
--- a/post/lib_powerpc/cmp.c
+++ b/post/lib_powerpc/cmp.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/cmpi.c b/post/lib_powerpc/cmpi.c
index 29a65895306..938c7f82698 100644
--- a/post/lib_powerpc/cmpi.c
+++ b/post/lib_powerpc/cmpi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 8506fd6b715..a4b31aaa8e4 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/cr.c b/post/lib_powerpc/cr.c
index 1c1c1e3700b..370aacc6350 100644
--- a/post/lib_powerpc/cr.c
+++ b/post/lib_powerpc/cr.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/load.c b/post/lib_powerpc/load.c
index 19f88d07d7f..589ac587bbf 100644
--- a/post/lib_powerpc/load.c
+++ b/post/lib_powerpc/load.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c
index 29c102d70ee..c361357f424 100644
--- a/post/lib_powerpc/multi.c
+++ b/post/lib_powerpc/multi.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/rlwimi.c b/post/lib_powerpc/rlwimi.c
index be63f960ed6..4d3b89c4fc0 100644
--- a/post/lib_powerpc/rlwimi.c
+++ b/post/lib_powerpc/rlwimi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/rlwinm.c b/post/lib_powerpc/rlwinm.c
index 13577f858e1..7c2f61cb0c7 100644
--- a/post/lib_powerpc/rlwinm.c
+++ b/post/lib_powerpc/rlwinm.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/rlwnm.c b/post/lib_powerpc/rlwnm.c
index 2a3525466c3..be2fcf9350c 100644
--- a/post/lib_powerpc/rlwnm.c
+++ b/post/lib_powerpc/rlwnm.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/srawi.c b/post/lib_powerpc/srawi.c
index 22a747b63ea..1508a77fc73 100644
--- a/post/lib_powerpc/srawi.c
+++ b/post/lib_powerpc/srawi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/store.c b/post/lib_powerpc/store.c
index a8bf67ea9e2..c9d872675ff 100644
--- a/post/lib_powerpc/store.c
+++ b/post/lib_powerpc/store.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/string.c b/post/lib_powerpc/string.c
index c292f8f0f8e..b779faffbf6 100644
--- a/post/lib_powerpc/string.c
+++ b/post/lib_powerpc/string.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/three.c b/post/lib_powerpc/three.c
index a4f7262698c..382a8183563 100644
--- a/post/lib_powerpc/three.c
+++ b/post/lib_powerpc/three.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/threei.c b/post/lib_powerpc/threei.c
index 74d6a3f2999..184ccaa1854 100644
--- a/post/lib_powerpc/threei.c
+++ b/post/lib_powerpc/threei.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/threex.c b/post/lib_powerpc/threex.c
index e8c6959bf90..153639c8abe 100644
--- a/post/lib_powerpc/threex.c
+++ b/post/lib_powerpc/threex.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/two.c b/post/lib_powerpc/two.c
index a576452f6f2..d0a70077fbb 100644
--- a/post/lib_powerpc/two.c
+++ b/post/lib_powerpc/two.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/lib_powerpc/twox.c b/post/lib_powerpc/twox.c
index 4e53fff2774..934352bacd7 100644
--- a/post/lib_powerpc/twox.c
+++ b/post/lib_powerpc/twox.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <irq_func.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 /*
  * CPU test
diff --git a/post/post.c b/post/post.c
index 758e4ecba19..d86be8d5826 100644
--- a/post/post.c
+++ b/post/post.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <compiler.h>
 #include <env.h>
 #include <log.h>
 #include <malloc.h>
@@ -20,6 +21,7 @@
 #include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
 #include <asm/gpio.h>
diff --git a/test/bloblist.c b/test/bloblist.c
index fed3e60d211..474d953625b 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <asm/global_data.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <test/suites.h>
diff --git a/test/cmd/mem_search.c b/test/cmd/mem_search.c
index d57bfad3982..b16533248f5 100644
--- a/test/cmd/mem_search.c
+++ b/test/cmd/mem_search.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <console.h>
 #include <mapmem.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <test/ut.h>
 
diff --git a/test/compression.c b/test/compression.c
index 4fc7b07fece..63bc09d8167 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -14,6 +14,7 @@
 #include <mapmem.h>
 #include <stdio.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 #include <u-boot/zlib.h>
 #include <bzlib.h>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index aebaea81df2..f3c0c790ed1 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <stdbool.h>
 #include <version.h>
 #include <tables_csum.h>
 #include <version.h>
@@ -22,6 +23,7 @@
 #include <dm/test.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include "acpi.h"
 
diff --git a/test/dm/acpi.h b/test/dm/acpi.h
index 535db56b51e..efb608354fc 100644
--- a/test/dm/acpi.h
+++ b/test/dm/acpi.h
@@ -9,6 +9,7 @@
 #ifndef __TEST_DM_ACPI_H
 #define __TEST_DM_ACPI_H
 
+#include <asm/types.h>
 #define ACPI_TEST_DEV_NAME	"ABCD"
 #define ACPI_TEST_CHILD_NAME	"EFGH"
 
diff --git a/test/dm/acpi_dp.c b/test/dm/acpi_dp.c
index ce9c5e9abb0..08edd0e76d1 100644
--- a/test/dm/acpi_dp.c
+++ b/test/dm/acpi_dp.c
@@ -16,6 +16,7 @@
 #include <dm/test.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include "acpi.h"
 
diff --git a/test/dm/acpigen.c b/test/dm/acpigen.c
index 8c9afe82194..a6cb6115ee8 100644
--- a/test/dm/acpigen.c
+++ b/test/dm/acpigen.c
@@ -20,6 +20,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include "acpi.h"
 
diff --git a/test/dm/audio.c b/test/dm/audio.c
index 77c3a3625bd..efb09d39ffc 100644
--- a/test/dm/audio.c
+++ b/test/dm/audio.c
@@ -8,6 +8,7 @@
 #include <audio_codec.h>
 #include <dm.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include <asm/test.h>
 
diff --git a/test/dm/axi.c b/test/dm/axi.c
index 0706a733b74..ab99e97c6f5 100644
--- a/test/dm/axi.c
+++ b/test/dm/axi.c
@@ -8,6 +8,7 @@
 #include <axi.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <linux/kernel.h>
 #include <test/ut.h>
diff --git a/test/dm/bootcount.c b/test/dm/bootcount.c
index be0c2789070..4d49119e1ff 100644
--- a/test/dm/bootcount.c
+++ b/test/dm/bootcount.c
@@ -8,6 +8,7 @@
 #include <bootcount.h>
 #include <log.h>
 #include <asm/test.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <test/ut.h>
 
diff --git a/test/dm/clk.c b/test/dm/clk.c
index 48fc3dd714c..35afa577a43 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -12,6 +12,7 @@
 #include <dm/test.h>
 #include <dm/device-internal.h>
 #include <linux/err.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Base test of the clk uclass */
diff --git a/test/dm/core.c b/test/dm/core.c
index 461098c0a2a..92e4b28ca76 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -20,6 +20,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/devres.c b/test/dm/devres.c
index 550787495dc..dd104679f07 100644
--- a/test/dm/devres.c
+++ b/test/dm/devres.c
@@ -14,6 +14,7 @@
 #include <dm/devres.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Test that devm_kmalloc() allocates memory, free when device is removed */
diff --git a/test/dm/dma.c b/test/dm/dma.c
index 317ed4fe8c6..22767f61834 100644
--- a/test/dm/dma.c
+++ b/test/dm/dma.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <dm/test.h>
 #include <dma.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static int dm_test_dma_m2m(struct unit_test_state *uts)
diff --git a/test/dm/dsi_host.c b/test/dm/dsi_host.c
index 59fcd5558f0..77aa989fe94 100644
--- a/test/dm/dsi_host.c
+++ b/test/dm/dsi_host.c
@@ -9,6 +9,7 @@
 #include <dsi_host.h>
 #include <asm/state.h>
 #include <asm/test.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <test/ut.h>
 
diff --git a/test/dm/fdtdec.c b/test/dm/fdtdec.c
index f835240de76..eee938ea81b 100644
--- a/test/dm/fdtdec.c
+++ b/test/dm/fdtdec.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <dm/of_extra.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index 7972e6aba67..cd2ba954d95 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Test that sandbox GPIOs work correctly */
diff --git a/test/dm/i2c.c b/test/dm/i2c.c
index fc54c7323c3..b074b37c767 100644
--- a/test/dm/i2c.c
+++ b/test/dm/i2c.c
@@ -17,6 +17,7 @@
 #include <dm/util.h>
 #include <hexdump.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static const int busnum;
diff --git a/test/dm/i2s.c b/test/dm/i2s.c
index 76d3d34eaa0..5b2d24c980b 100644
--- a/test/dm/i2s.c
+++ b/test/dm/i2s.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <linux/kernel.h>
 #include <test/ut.h>
diff --git a/test/dm/k210_pll.c b/test/dm/k210_pll.c
index 076dc770b87..b72fd55883a 100644
--- a/test/dm/k210_pll.c
+++ b/test/dm/k210_pll.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 /* For DIV_ROUND_DOWN_ULL, defined in linux/kernel.h */
diff --git a/test/dm/mailbox.c b/test/dm/mailbox.c
index a511da04d1a..67149b36e4c 100644
--- a/test/dm/mailbox.c
+++ b/test/dm/mailbox.c
@@ -9,6 +9,7 @@
 #include <dm/test.h>
 #include <asm/mbox.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static int dm_test_mailbox(struct unit_test_state *uts)
diff --git a/test/dm/mdio.c b/test/dm/mdio.c
index ba1b54f27e2..9a9c58fa2a3 100644
--- a/test/dm/mdio.c
+++ b/test/dm/mdio.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <misc.h>
 #include <test/ut.h>
diff --git a/test/dm/mdio_mux.c b/test/dm/mdio_mux.c
index f962e09dbc2..732b3fa079e 100644
--- a/test/dm/mdio_mux.c
+++ b/test/dm/mdio_mux.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <misc.h>
 #include <test/ut.h>
diff --git a/test/dm/misc.c b/test/dm/misc.c
index 6fff38e978a..c5a7cc49890 100644
--- a/test/dm/misc.c
+++ b/test/dm/misc.c
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <dm/test.h>
 #include <misc.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static int dm_test_misc(struct unit_test_state *uts)
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 1114f34cbf8..2a07bc6dc47 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/types.h>
 #include <dm/of_extra.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/osd.c b/test/dm/osd.c
index e1329349b2c..d1e5b299e57 100644
--- a/test/dm/osd.c
+++ b/test/dm/osd.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <stdio.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include <video_osd.h>
 #include <asm/test.h>
diff --git a/test/dm/panel.c b/test/dm/panel.c
index 907257042ed..a7d4166cd41 100644
--- a/test/dm/panel.c
+++ b/test/dm/panel.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <asm/test.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include <power/regulator.h>
 
diff --git a/test/dm/pch.c b/test/dm/pch.c
index d054723627d..2652ffc0055 100644
--- a/test/dm/pch.c
+++ b/test/dm/pch.c
@@ -9,6 +9,7 @@
 #include <asm/test.h>
 #include <dm/test.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Test that sandbox PCH works correctly */
diff --git a/test/dm/pci.c b/test/dm/pci.c
index 41b7adb62ea..68e76aab34f 100644
--- a/test/dm/pci.c
+++ b/test/dm/pci.c
@@ -9,6 +9,7 @@
 #include <asm/test.h>
 #include <asm/u-boot.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Test that sandbox PCI works correctly */
diff --git a/test/dm/pmic.c b/test/dm/pmic.c
index b582329a9c5..617b1ef18d4 100644
--- a/test/dm/pmic.c
+++ b/test/dm/pmic.c
@@ -16,6 +16,7 @@
 #include <dm/util.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
+#include <linux/types.h>
 #include <power/pmic.h>
 #include <power/sandbox_pmic.h>
 #include <test/ut.h>
diff --git a/test/dm/power-domain.c b/test/dm/power-domain.c
index 8baf5d09d1d..d24cb3459f0 100644
--- a/test/dm/power-domain.c
+++ b/test/dm/power-domain.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <dm/test.h>
 #include <asm/power-domain.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* This must match the specifier for power-domains in the DT node */
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index 92d6bf7be29..c0e2df1b2b8 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -14,6 +14,7 @@
 #include <dm/test.h>
 #include <linux/err.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Base test of register maps */
diff --git a/test/dm/regulator.c b/test/dm/regulator.c
index 2d6f88cf04f..7a891ef3584 100644
--- a/test/dm/regulator.c
+++ b/test/dm/regulator.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <stdbool.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
 #include <dm/util.h>
diff --git a/test/dm/remoteproc.c b/test/dm/remoteproc.c
index bfeadad8996..480b424b863 100644
--- a/test/dm/remoteproc.c
+++ b/test/dm/remoteproc.c
@@ -12,6 +12,7 @@
 #include <dm/test.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/ut.h>
 /**
  * dm_test_remoteproc_base() - test the operations after initializations
diff --git a/test/dm/reset.c b/test/dm/reset.c
index 871d6400a07..a5a48c8dfc7 100644
--- a/test/dm/reset.c
+++ b/test/dm/reset.c
@@ -10,6 +10,7 @@
 #include <reset.h>
 #include <dm/test.h>
 #include <asm/reset.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* This must match the specifier for mbox-names="test" in the DT node */
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 2ef74cd98dd..f0716dff62d 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/rtc.h>
 #include <asm/test.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <linux/errno.h>
 #include <test/ut.h>
diff --git a/test/dm/serial.c b/test/dm/serial.c
index a9ca9689ce8..2f945a8d915 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dm/test.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static int dm_test_serial(struct unit_test_state *uts)
diff --git a/test/dm/sf.c b/test/dm/sf.c
index 9e7dead684d..8d0b72abcc7 100644
--- a/test/dm/sf.c
+++ b/test/dm/sf.c
@@ -15,6 +15,7 @@
 #include <asm/test.h>
 #include <dm/test.h>
 #include <dm/util.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Simple test of sandbox SPI flash */
diff --git a/test/dm/smem.c b/test/dm/smem.c
index 4099a5f66c4..ee67dd5096b 100644
--- a/test/dm/smem.c
+++ b/test/dm/smem.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <smem.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Basic test of the smem uclass */
diff --git a/test/dm/syscon-reset.c b/test/dm/syscon-reset.c
index 85ac3d8ade0..97db10e6c68 100644
--- a/test/dm/syscon-reset.c
+++ b/test/dm/syscon-reset.c
@@ -10,6 +10,7 @@
 #include <reset.h>
 #include <syscon.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 #include <asm/test.h>
 #include <linux/bitops.h>
diff --git a/test/dm/tee.c b/test/dm/tee.c
index 4a55ab287c4..9f93b38c1f6 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/types.h>
 #include <dm/test.h>
 #include <sandboxtee.h>
 #include <tee.h>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 180a8c93f02..73324b4d9fe 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -21,6 +21,7 @@
 #include <dm/lists.h>
 #include <dm/of_access.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/video.c b/test/dm/video.c
index 1ab35482fea..d026ad30426 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -16,6 +16,7 @@
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /*
diff --git a/test/dm/virtio.c b/test/dm/virtio.c
index 191229272be..b25919d9e68 100644
--- a/test/dm/virtio.c
+++ b/test/dm/virtio.c
@@ -13,6 +13,7 @@
 #include <dm/root.h>
 #include <dm/test.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Basic test of the virtio uclass */
diff --git a/test/dm/wdt.c b/test/dm/wdt.c
index 1d31ec55c64..89a07f8617e 100644
--- a/test/dm/wdt.c
+++ b/test/dm/wdt.c
@@ -9,6 +9,7 @@
 #include <asm/state.h>
 #include <asm/test.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 /* Test that watchdog driver functions are called */
diff --git a/test/env/hashtable.c b/test/env/hashtable.c
index 4331eac02fe..ca677d6f795 100644
--- a/test/env/hashtable.c
+++ b/test/env/hashtable.c
@@ -10,6 +10,7 @@
 #include <search.h>
 #include <stdio.h>
 #include <vsprintf.h>
+#include <linux/types.h>
 #include <test/env.h>
 #include <test/ut.h>
 
diff --git a/test/lib/hexdump.c b/test/lib/hexdump.c
index 5dccf438866..2ed402021dd 100644
--- a/test/lib/hexdump.c
+++ b/test/lib/hexdump.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <hexdump.h>
+#include <asm/types.h>
 #include <test/lib.h>
 #include <test/test.h>
 #include <test/ut.h>
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index a0fe0f6b339..6dd142bf62e 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <dm/test.h>
+#include <linux/types.h>
 #include <test/ut.h>
 
 static int check_lmb(struct unit_test_state *uts, struct lmb *lmb,
diff --git a/test/lib/string.c b/test/lib/string.c
index 64234bef36c..20865a9a9c7 100644
--- a/test/lib/string.c
+++ b/test/lib/string.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <asm/types.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 2ba300e4a54..63c3ebb7cc4 100644
--- a/test/lib/test_aes.c
+++ b/test/lib/test_aes.c
@@ -11,6 +11,7 @@
 #include <rand.h>
 #include <stdio.h>
 #include <uboot_aes.h>
+#include <asm/types.h>
 #include <linux/kernel.h>
 #include <test/lib.h>
 #include <test/test.h>
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 7ad13a930a2..f1e40bb1d8f 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/cmd_ut_optee.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <stdbool.h>
+#include <asm/types.h>
 #include <linux/errno.h>
 #include <tee/optee.h>
 
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index ee8c4944e40..8f8d29fde48 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <linux/errno.h>
+#include <linux/types.h>
 
 #include <linux/sizes.h>
 
diff --git a/test/print_ut.c b/test/print_ut.c
index d317cbf5562..3ce7960cb64 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <version.h>
 #include <vsprintf.h>
+#include <asm/types.h>
 
 #define FAKE_BUILD_TAG	"jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \
 			"and a lot more text to come"
diff --git a/test/stdint/int-types.c b/test/stdint/int-types.c
index 0cde46dafa0..49091af43c1 100644
--- a/test/stdint/int-types.c
+++ b/test/stdint/int-types.c
@@ -1,5 +1,6 @@
 #include <common.h>
 #include <stdio.h>
+#include <linux/types.h>
 
 int test_types(void)
 {
diff --git a/test/str_ut.c b/test/str_ut.c
index 990f356227c..a2c2fb39253 100644
--- a/test/str_ut.c
+++ b/test/str_ut.c
@@ -4,8 +4,10 @@
  */
 
 #include <common.h>
+#include <stdbool.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/suites.h>
 #include <test/test.h>
 #include <test/ut.h>
diff --git a/test/time_ut.c b/test/time_ut.c
index 456186e08e9..3e072d19b48 100644
--- a/test/time_ut.c
+++ b/test/time_ut.c
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 
 static int test_get_timer(void)
 {
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index cfea5a9798a..b8d83677f6b 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <vsprintf.h>
 #include <linux/kernel.h>
+#include <linux/types.h>
 #include <test/test.h>
 #include <test/suites.h>
 #include <test/ut.h>
diff --git a/test/ut.c b/test/ut.c
index 001c89e9a4f..c98e0cde81a 100644
--- a/test/ut.c
+++ b/test/ut.c
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <vsprintf.h>
 #include <asm/global_data.h>
+#include <linux/types.h>
 #include <test/test.h>
 #include <test/ut.h>
 
-- 
2.28.0.163.g6104cc2f0b6-goog



More information about the U-Boot mailing list