summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/abootimg.c1
-rw-r--r--cmd/acpi.c1
-rw-r--r--cmd/adtimg.c1
-rw-r--r--cmd/aes.c1
-rw-r--r--cmd/armflash.c1
-rw-r--r--cmd/avb.c2
-rw-r--r--cmd/axi.c1
-rw-r--r--cmd/bcb.c1
-rw-r--r--cmd/bdinfo.c2
-rw-r--r--cmd/bedbug.c1
-rw-r--r--cmd/binop.c1
-rw-r--r--cmd/blk_common.c1
-rw-r--r--cmd/blob.c2
-rw-r--r--cmd/bmp.c2
-rw-r--r--cmd/boot.c1
-rw-r--r--cmd/bootefi.c1
-rw-r--r--cmd/booti.c1
-rw-r--r--cmd/bootm.c1
-rw-r--r--cmd/bootstage.c1
-rw-r--r--cmd/bootz.c2
-rw-r--r--cmd/cache.c1
-rw-r--r--cmd/cbfs.c1
-rw-r--r--cmd/clk.c2
-rw-r--r--cmd/cpu.c1
-rw-r--r--cmd/cramfs.c1
-rw-r--r--cmd/cros_ec.c1
-rw-r--r--cmd/demo.c1
-rw-r--r--cmd/disk.c1
-rw-r--r--cmd/eeprom.c2
-rw-r--r--cmd/efi.c2
-rw-r--r--cmd/efidebug.c1
-rw-r--r--cmd/elf.c1
-rw-r--r--cmd/fastboot.c1
-rw-r--r--cmd/fat.c1
-rw-r--r--cmd/flash.c1
-rw-r--r--cmd/fpga.c1
-rw-r--r--cmd/fpgad.c1
-rw-r--r--cmd/fuse.c1
-rw-r--r--cmd/gpio.c2
-rw-r--r--cmd/gpt.c2
-rw-r--r--cmd/i2c.c2
-rw-r--r--cmd/ini.c1
-rw-r--r--cmd/io.c1
-rw-r--r--cmd/iotrace.c1
-rw-r--r--cmd/itest.c1
-rw-r--r--cmd/jffs2.c1
-rw-r--r--cmd/legacy-mtd-utils.c1
-rw-r--r--cmd/legacy-mtd-utils.h1
-rw-r--r--cmd/legacy_led.c1
-rw-r--r--cmd/load.c1
-rw-r--r--cmd/log.c1
-rw-r--r--cmd/lzmadec.c1
-rw-r--r--cmd/md5sum.c1
-rw-r--r--cmd/mdio.c1
-rw-r--r--cmd/mem.c2
-rw-r--r--cmd/mii.c2
-rw-r--r--cmd/misc.c1
-rw-r--r--cmd/mmc.c2
-rw-r--r--cmd/mtd.c2
-rw-r--r--cmd/mtdparts.c1
-rw-r--r--cmd/mvebu/bubt.c1
-rw-r--r--cmd/nand.c1
-rw-r--r--cmd/net.c1
-rw-r--r--cmd/nvedit.c2
-rw-r--r--cmd/nvedit_efi.c2
-rw-r--r--cmd/onenand.c1
-rw-r--r--cmd/osd.c1
-rw-r--r--cmd/pcap.c1
-rw-r--r--cmd/pci.c2
-rw-r--r--cmd/pmic.c1
-rw-r--r--cmd/pxe_utils.c2
-rw-r--r--cmd/pxe_utils.h1
-rw-r--r--cmd/qfw.c1
-rw-r--r--cmd/read.c1
-rw-r--r--cmd/regulator.c1
-rw-r--r--cmd/reiser.c1
-rw-r--r--cmd/remoteproc.c1
-rw-r--r--cmd/rng.c1
-rw-r--r--cmd/rtc.c1
-rw-r--r--cmd/setexpr.c1
-rw-r--r--cmd/sf.c2
-rw-r--r--cmd/source.c1
-rw-r--r--cmd/spi.c1
-rw-r--r--cmd/ti/ddr3.c1
-rw-r--r--cmd/time.c1
-rw-r--r--cmd/tlv_eeprom.c2
-rw-r--r--cmd/tpm-common.c1
-rw-r--r--cmd/tpm-user-utils.h1
-rw-r--r--cmd/tpm-v1.c1
-rw-r--r--cmd/tpm-v2.c1
-rw-r--r--cmd/tpm_test.c1
-rw-r--r--cmd/trace.c1
-rw-r--r--cmd/tsi148.c1
-rw-r--r--cmd/ubi.c2
-rw-r--r--cmd/ubifs.c1
-rw-r--r--cmd/universe.c1
-rw-r--r--cmd/unlz4.c1
-rw-r--r--cmd/usb.c1
-rw-r--r--cmd/usb_mass_storage.c1
-rw-r--r--cmd/version.c1
-rw-r--r--cmd/w1.c1
-rw-r--r--cmd/wdt.c1
-rw-r--r--cmd/wol.c1
-rw-r--r--cmd/x86/fsp.c1
-rw-r--r--cmd/x86/hob.c1
-rw-r--r--cmd/x86/mtrr.c1
-rw-r--r--cmd/ximg.c1
-rw-r--r--cmd/yaffs2.c1
-rw-r--r--cmd/zfs.c1
109 files changed, 131 insertions, 0 deletions
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 3c6de9a8e8..1b1a4b3a26 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 c47cfdfd95..93c3f8f7a1 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 ea6230ba1f..f3728aa386 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 b4a3dcc74c..24d97a7588 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 e76838c55c..8436980125 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 08711e3240..7434b4b0d6 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 8a3a5f6866..8d268ad610 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 e95111796c..f6be4fa357 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 c80395a50f..c313fae128 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 <lmb.h>
#include <net.h>
@@ -17,6 +18,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 6dc3bab74d..d6cdf74dd1 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -14,6 +14,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 9fde726b5c..9710f9569e 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 4bf7a582b5..9f6b936d9e 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 d4ee6966e9..27878e9963 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 d2ea39ed67..0c2f916be1 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 8b079b3171..179ddc6a1e 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 63902ef730..28320b3661 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -27,6 +27,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 405152c80e..baf7d7f80b 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 e253bdd9e9..9692a36607 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -24,6 +24,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 3649e749cd..c0783bcb47 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 e34ed63b4d..71494f4cf3 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>
@@ -14,6 +15,7 @@
#include <stdio.h>
#include <vsprintf.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 19890c2566..fab3091bd2 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 8f7a10751f..a0a0e6b107 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 a2bfce12ae..d51b987dde 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 a4b1ee5b57..cd502ef528 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 b34a4dde07..4607176377 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 7f089d7644..8e0f63eadb 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 52986bb8ee..4e05030501 100644
--- a/cmd/demo.c
+++ b/cmd/demo.c
@@ -15,6 +15,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 fcb19ee02e..80a23385b1 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 d5b1ae536b..49e35e678c 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 dd48101ae8..fba91a3d93 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 cc7a00c2bf..6557080e65 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 325fb19d8f..2fc1977cad 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 0a6cfe4530..aa1710d4ee 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 e3bee99ec9..b916b99c79 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 56995822cb..8d70c4d9a9 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 d7e20a622d..31630c2701 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 96901b684a..77be4e1e76 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 b75676e641..50f0d25e1e 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 570c17d5ba..b614c75e2b 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 11ad5f7de4..7f60bf6f1f 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 f21ed9ee35..5735ea3fdd 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 7c3849bd50..54315adce7 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 62141846ba..af23f3fc62 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 f6db7ad48e..05cea98612 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 5824a7f18d..1256524468 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 b2dba80cf2..5c59964fea 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 2918ee6d28..def89fa0fc 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 ac441d5558..a158439b9c 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 d70f6d1146..2a1a6b669e 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 c550f7643a..dec8612d2d 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 d9c76ccdd2..1ef1422d6b 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 1452a7ac55..5b13d385ff 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 2fb8d7b275..26e7acddd5 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 50e3919487..9d5ddfdb1a 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -16,6 +16,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 634c35c149..bc6f13a529 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 2db28bb8ac..e72e230e78 100644
--- a/cmd/mii.c
+++ b/cmd/mii.c
@@ -12,10 +12,12 @@
#include <command.h>
#include <dm.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 65bc67f6da..09e161a0cc 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 0e6dbd07f0..2df918cd1b 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 <linux/kernel.h>
#include <linux/string.h>
diff --git a/cmd/mtd.c b/cmd/mtd.c
index 24144546f9..b619cf5fd6 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 f18a6e70f1..2a97f61e50 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 f0c76c0b63..6d3e9802ba 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 f2f29a326f..a7d6505bfb 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 691cef1736..d1f71def5e 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 2fbbe52371..7279154c27 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 91214c93e2..c8f3015e06 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 252636012c..05bdf2b95c 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 a7527f8a73..d5bbfef3a9 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 b5a3b3c044..2a03d8ffb1 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 1ce1a7a362..9a063a91db 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 b26b131055..3fd6245ae3 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 86f280bb10..1b26bf4f55 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 1a25ca4e88..8976a392a8 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 ca60a05f6b..d45ba93e2b 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 254925c1f7..61dd5ceb13 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 e4968b7b37..98286a4dfc 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 8a2f976a21..4bf069f742 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 48f0e4684c..fff6986680 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 92d7c0de63..f498c35fdb 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 78af8534e4..db7341d5a6 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 9aefaeb141..03beb0c1f5 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 d57da5f8b0..f85f60774a 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 d5488a903e..d980d3ca62 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 2079ed0e1b..9698e0d042 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 c036df8a1f..903d623505 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 7d4345bbf7..4672fe9d37 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 da052a9845..7944e8daa3 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 2df4dc0692..6296c9d9da 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 358ddff576..7a763d2b4c 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 0c96b10f06..495c17ef12 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 2be09f547d..d7201df3a2 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 3a345877a2..5d4aafa67c 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 46b498700e..063012082f 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 17f7f192f9..928eedc08c 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 80c175eec5..d8f54fdc82 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 191199c076..0f1aebde0f 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 b1eeff7a66..39eaf9af9a 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 a885c93dc4..3c3d928243 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 6a6d20096a..27cf810ade 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 36a905cd77..24979bd97d 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 dcd91f09fa..874fd68e18 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 be6d076a88..699336f4b5 100644
--- a/cmd/w1.c
+++ b/cmd/w1.c
@@ -11,6 +11,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 c9c7a610ef..0a8ef78281 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 61a9d95e0e..48359adb6e 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 933fe8af40..d712989483 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 ed1c42f493..fcb3dee2e6 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 a766eca785..cccdc3afbf 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 68f3d14c5b..f9032bea3e 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 29b52f7ced..fe9a2bb6c9 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 dde1c097c6..5c59d44337 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>