summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-05-07 08:01:06 -0600
committerTom Rini <[email protected]>2024-05-07 08:01:06 -0600
commit7e2938beabac24e6c8baad33e254b2383dbe9490 (patch)
treedbefd5a48f5b034108c6b5b7c2138430539622b2 /include
parent52835266d3e933656a217233eaf672dd9ccd7352 (diff)
parent47558a4fce629390133bc6f410a942f109165efd (diff)
Merge branch '2024-05-06-remove-include-common_h' into next
- Merge the four series that I made to finally remove include/common.h. For the most part, this is just removing <common.h> entirely. In a few cases we needed to add <linux/types.h> or <time.h>. In the case of PowerPC related code, we instead need to bring in <asm/ppc.h>.
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_s3.h3
-rw-r--r--include/adc.h2
-rw-r--r--include/android_ab.h2
-rw-r--r--include/api_public.h2
-rw-r--r--include/atf_common.h2
-rw-r--r--include/audio_codec.h2
-rw-r--r--include/autoboot.h1
-rw-r--r--include/axi.h2
-rw-r--r--include/bmp_layout.h2
-rw-r--r--include/bootmeth.h2
-rw-r--r--include/bootstd.h2
-rw-r--r--include/cedit.h3
-rw-r--r--include/common.h33
-rw-r--r--include/configs/mt7621.h3
-rw-r--r--include/configs/mt7623.h3
-rw-r--r--include/configs/octeontx2_common.h5
-rw-r--r--include/ddr_spd.h2
-rw-r--r--include/display.h2
-rw-r--r--include/dm/of.h1
-rw-r--r--include/dm/test.h2
-rw-r--r--include/eeprom.h2
-rw-r--r--include/env_callback.h1
-rw-r--r--include/env_default.h1
-rw-r--r--include/env_flags.h2
-rw-r--r--include/extension_board.h2
-rw-r--r--include/flash.h2
-rw-r--r--include/fsl_errata.h2
-rw-r--r--include/fsl_ifc.h2
-rw-r--r--include/fsl_immap.h3
-rw-r--r--include/fuse.h2
-rw-r--r--include/gzip.h2
-rw-r--r--include/handoff.h1
-rw-r--r--include/i2c_eeprom.h1
-rw-r--r--include/init.h2
-rw-r--r--include/jffs2/load_kernel.h1
-rw-r--r--include/libata.h1
-rw-r--r--include/linux/compat.h1
-rw-r--r--include/linux/mtd/omap_gpmc.h2
-rw-r--r--include/mailbox.h2
-rw-r--r--include/mmc.h9
-rw-r--r--include/mpc85xx.h1
-rw-r--r--include/nand.h2
-rw-r--r--include/netdev.h3
-rw-r--r--include/pci.h1
-rw-r--r--include/phy_interface.h1
-rw-r--r--include/ram.h2
-rw-r--r--include/s_record.h2
-rw-r--r--include/sm.h2
-rw-r--r--include/splash.h1
-rw-r--r--include/u-boot/sha1.h2
-rw-r--r--include/u-boot/sha256.h2
-rw-r--r--include/u-boot/sha512.h2
-rw-r--r--include/virtio.h1
-rw-r--r--include/xen/events.h1
54 files changed, 83 insertions, 57 deletions
diff --git a/include/acpi/acpi_s3.h b/include/acpi/acpi_s3.h
index d3f271f948e..f7bea941855 100644
--- a/include/acpi/acpi_s3.h
+++ b/include/acpi/acpi_s3.h
@@ -37,6 +37,9 @@
#ifndef __ASSEMBLY__
+#include <linux/errno.h>
+#include <linux/types.h>
+
extern char __wakeup[];
extern int __wakeup_size;
diff --git a/include/adc.h b/include/adc.h
index 0d1a666908f..15e4cdb7dce 100644
--- a/include/adc.h
+++ b/include/adc.h
@@ -7,6 +7,8 @@
#ifndef _ADC_H_
#define _ADC_H_
+#include <stdbool.h>
+
/* ADC_CHANNEL() - ADC channel bit mask, to select only required channels */
#define ADC_CHANNEL(x) (1 << x)
diff --git a/include/android_ab.h b/include/android_ab.h
index 1fee7582b90..dbf20343da6 100644
--- a/include/android_ab.h
+++ b/include/android_ab.h
@@ -6,6 +6,8 @@
#ifndef __ANDROID_AB_H
#define __ANDROID_AB_H
+#include <stdbool.h>
+
struct blk_desc;
struct disk_partition;
diff --git a/include/api_public.h b/include/api_public.h
index 5a4465ea893..e89572c00a4 100644
--- a/include/api_public.h
+++ b/include/api_public.h
@@ -8,6 +8,8 @@
#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/atf_common.h b/include/atf_common.h
index d69892fac6c..5ae45090252 100644
--- a/include/atf_common.h
+++ b/include/atf_common.h
@@ -74,6 +74,8 @@
#ifndef __ASSEMBLY__
+#include <linux/types.h>
+
/*******************************************************************************
* 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.
diff --git a/include/audio_codec.h b/include/audio_codec.h
index a81a3151576..a87b76c6f9e 100644
--- a/include/audio_codec.h
+++ b/include/audio_codec.h
@@ -7,6 +7,8 @@
#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 eb204995d07..c68bd79f8dc 100644
--- a/include/autoboot.h
+++ b/include/autoboot.h
@@ -12,6 +12,7 @@
#define __AUTOBOOT_H
#include <stdbool.h>
+#include <stddef.h>
#ifdef CONFIG_SANDBOX
diff --git a/include/axi.h b/include/axi.h
index 59fb0b2e458..133a06ee271 100644
--- a/include/axi.h
+++ b/include/axi.h
@@ -7,6 +7,8 @@
#ifndef _AXI_H_
#define _AXI_H_
+#include <linux/types.h>
+
struct udevice;
/**
diff --git a/include/bmp_layout.h b/include/bmp_layout.h
index a5c9498dc9f..eabbd25a330 100644
--- a/include/bmp_layout.h
+++ b/include/bmp_layout.h
@@ -10,6 +10,8 @@
#ifndef _BMP_H_
#define _BMP_H_
+#include <linux/compiler.h>
+
struct __packed bmp_color_table_entry {
__u8 blue;
__u8 green;
diff --git a/include/bootmeth.h b/include/bootmeth.h
index 0fc36104ece..cd9517321c0 100644
--- a/include/bootmeth.h
+++ b/include/bootmeth.h
@@ -7,6 +7,8 @@
#ifndef __bootmeth_h
#define __bootmeth_h
+#include <linux/bitops.h>
+
struct blk_desc;
struct bootflow;
struct bootflow_iter;
diff --git a/include/bootstd.h b/include/bootstd.h
index 99ce7b64e7c..ac756e98d84 100644
--- a/include/bootstd.h
+++ b/include/bootstd.h
@@ -10,6 +10,8 @@
#define __bootstd_h
#include <dm/ofnode_decl.h>
+#include <linux/list.h>
+#include <linux/types.h>
struct udevice;
diff --git a/include/cedit.h b/include/cedit.h
index f43cafa5aa2..a31b4245247 100644
--- a/include/cedit.h
+++ b/include/cedit.h
@@ -7,12 +7,15 @@
#ifndef __CEDIT_H
#define __CEDIT_H
+#include <stdbool.h>
#include <dm/ofnode_decl.h>
+#include <linux/types.h>
struct abuf;
struct expo;
struct scene;
struct video_priv;
+struct udevice;
enum {
/* size increment for writing FDT */
diff --git a/include/common.h b/include/common.h
deleted file mode 100644
index a79c2bb4993..00000000000
--- a/include/common.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Common header file for U-Boot
- *
- * This file still includes quite a few headers that should be included
- * individually as needed. Patches to remove things are welcome.
- *
- * (C) Copyright 2000-2009
- * Wolfgang Denk, DENX Software Engineering, [email protected].
- */
-
-#ifndef __COMMON_H_
-#define __COMMON_H_ 1
-
-#ifndef __ASSEMBLY__ /* put C only stuff in this section */
-#include <config.h>
-#include <errno.h>
-#include <time.h>
-#include <linux/types.h>
-#include <linux/string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <linux/kernel.h>
-#include <asm/u-boot.h> /* boot information for Linux kernel */
-#include <vsprintf.h>
-#endif /* __ASSEMBLY__ */
-
-/* Pull in stuff for the build system */
-#ifdef DO_DEPS_ONLY
-# include <env_internal.h>
-#endif
-
-#endif /* __COMMON_H_ */
diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
index bf2bc2d45c0..e6dba707195 100644
--- a/include/configs/mt7621.h
+++ b/include/configs/mt7621.h
@@ -14,9 +14,6 @@
#define CFG_SYS_INIT_SP_OFFSET 0x800000
-/* MMC */
-#define MMC_SUPPORTS_TUNING
-
/* Serial SPL */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
#define CFG_SYS_NS16550_CLK 50000000
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
index fca234a1dc7..6f42cd32d80 100644
--- a/include/configs/mt7623.h
+++ b/include/configs/mt7623.h
@@ -11,9 +11,6 @@
#include <linux/sizes.h>
-/* MMC */
-#define MMC_SUPPORTS_TUNING
-
/* DRAM */
#define CFG_SYS_SDRAM_BASE 0x80000000
diff --git a/include/configs/octeontx2_common.h b/include/configs/octeontx2_common.h
index c4db38562d8..f415dffddbe 100644
--- a/include/configs/octeontx2_common.h
+++ b/include/configs/octeontx2_common.h
@@ -19,9 +19,4 @@
"loadaddr=20080000\0" \
"ethrotate=yes\0"
-#if defined(CONFIG_MMC_OCTEONTX)
-#define MMC_SUPPORTS_TUNING
-/** EMMC specific defines */
-#endif
-
#endif /* __OCTEONTX2_COMMON_H__ */
diff --git a/include/ddr_spd.h b/include/ddr_spd.h
index fe163da43e5..c4d199fd7e1 100644
--- a/include/ddr_spd.h
+++ b/include/ddr_spd.h
@@ -6,6 +6,8 @@
#ifndef _DDR_SPD_H_
#define _DDR_SPD_H_
+#include <linux/types.h>
+
/*
* Format from "JEDEC Standard No. 21-C,
* Appendix D: Rev 1.0: SPD's for DDR SDRAM
diff --git a/include/display.h b/include/display.h
index 3d012176441..e8d8aaa15fb 100644
--- a/include/display.h
+++ b/include/display.h
@@ -6,6 +6,8 @@
#ifndef _DISPLAY_H
#define _DISPLAY_H
+#include <linux/types.h>
+
struct udevice;
struct display_timing;
diff --git a/include/dm/of.h b/include/dm/of.h
index b1c934f610d..b7404c139d1 100644
--- a/include/dm/of.h
+++ b/include/dm/of.h
@@ -7,7 +7,6 @@
#ifndef _DM_OF_H
#define _DM_OF_H
-#include <asm/u-boot.h>
#include <asm/global_data.h>
/* integer value within a device tree property which references another node */
diff --git a/include/dm/test.h b/include/dm/test.h
index b5937509212..02737411a16 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -6,6 +6,8 @@
#ifndef __DM_TEST_H
#define __DM_TEST_H
+#include <linux/types.h>
+
struct udevice;
/**
diff --git a/include/eeprom.h b/include/eeprom.h
index f9c6542ba76..e223e4c7670 100644
--- a/include/eeprom.h
+++ b/include/eeprom.h
@@ -8,6 +8,8 @@
#define __EEPROM_LEGACY_H
#if defined(CONFIG_CMD_EEPROM) || defined(CONFIG_ENV_IS_IN_EEPROM)
+#include <linux/types.h>
+
void eeprom_init(int bus);
int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
diff --git a/include/env_callback.h b/include/env_callback.h
index 23bc650c162..8e500aaaf80 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -7,6 +7,7 @@
#ifndef __ENV_CALLBACK_H__
#define __ENV_CALLBACK_H__
+#include <config.h>
#include <env_flags.h>
#include <linker_lists.h>
#include <search.h>
diff --git a/include/env_default.h b/include/env_default.h
index 8ee500d1709..076ffdd44e9 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -7,6 +7,7 @@
* Andreas Heppel <[email protected]>
*/
+#include <config.h>
#include <env_callback.h>
#include <linux/stringify.h>
diff --git a/include/env_flags.h b/include/env_flags.h
index d785f87cdcb..2476043b0e3 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -7,6 +7,8 @@
#ifndef __ENV_FLAGS_H__
#define __ENV_FLAGS_H__
+#include <config.h>
+
enum env_flags_vartype {
env_flags_vartype_string,
env_flags_vartype_decimal,
diff --git a/include/extension_board.h b/include/extension_board.h
index 3b75b5ba9f7..87d404c0074 100644
--- a/include/extension_board.h
+++ b/include/extension_board.h
@@ -7,6 +7,8 @@
#ifndef __EXTENSION_SUPPORT_H
#define __EXTENSION_SUPPORT_H
+#include <linux/list.h>
+
struct extension {
struct list_head list;
char name[32];
diff --git a/include/flash.h b/include/flash.h
index 3710a2731b7..0f736977411 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -7,6 +7,8 @@
#ifndef _FLASH_H_
#define _FLASH_H_
+#include <linux/types.h>
+
/*-----------------------------------------------------------------------
* FLASH Info: contains chip specific data, per FLASH bank
*/
diff --git a/include/fsl_errata.h b/include/fsl_errata.h
index 44547645df8..9f070726acb 100644
--- a/include/fsl_errata.h
+++ b/include/fsl_errata.h
@@ -7,7 +7,7 @@
#define _FSL_ERRATA_H
#if defined(CONFIG_PPC)
-#include <asm/processor.h>
+#include <asm/ppc.h>
#elif defined(CONFIG_ARCH_LS1021A)
#include <asm/arch-ls102xa/immap_ls102xa.h>
#elif defined(CONFIG_FSL_LAYERSCAPE)
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index f9a0a7017d4..4991d932200 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -12,6 +12,8 @@
#include <part.h>
#ifdef CONFIG_ARM
#include <asm/arch/soc.h>
+#else
+#include <asm/ppc.h>
#endif
#define FSL_IFC_V1_1_0 0x01010000
diff --git a/include/fsl_immap.h b/include/fsl_immap.h
index 5297c0b3f9b..54d6e0ab377 100644
--- a/include/fsl_immap.h
+++ b/include/fsl_immap.h
@@ -7,6 +7,9 @@
#ifndef __FSL_IMMAP_H
#define __FSL_IMMAP_H
+
+#include <linux/types.h>
+
/*
* DDR memory controller registers
* This structure works for mpc83xx (DDR2 and DDR3), mpc85xx, mpc86xx.
diff --git a/include/fuse.h b/include/fuse.h
index d48dcdfa647..4519821af7e 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -11,6 +11,8 @@
#ifndef _FUSE_H_
#define _FUSE_H_
+#include <linux/types.h>
+
/*
* Read/Sense/Program/Override interface:
* bank: Fuse bank
diff --git a/include/gzip.h b/include/gzip.h
index e578b283edc..5e0d0ec07fb 100644
--- a/include/gzip.h
+++ b/include/gzip.h
@@ -7,6 +7,8 @@
#ifndef __GZIP_H
#define __GZIP_H
+#include <linux/types.h>
+
struct blk_desc;
/**
diff --git a/include/handoff.h b/include/handoff.h
index 0104b834f2c..c0ae7b19a75 100644
--- a/include/handoff.h
+++ b/include/handoff.h
@@ -10,6 +10,7 @@
#if CONFIG_IS_ENABLED(HANDOFF)
+#include <linux/types.h>
#include <asm/handoff.h>
/**
diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h
index cba991e3574..1fe32d2dd68 100644
--- a/include/i2c_eeprom.h
+++ b/include/i2c_eeprom.h
@@ -7,6 +7,7 @@
#define __I2C_EEPROM
#include <linux/errno.h>
+#include <linux/types.h>
struct udevice;
diff --git a/include/init.h b/include/init.h
index 630d86729c4..2c10171359c 100644
--- a/include/init.h
+++ b/include/init.h
@@ -401,6 +401,8 @@ void bdinfo_print_size(const char *name, uint64_t size);
/* Show arch-specific information for the 'bd' command */
void arch_print_bdinfo(void);
+struct cmd_tbl;
+
int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
#endif /* __ASSEMBLY__ */
diff --git a/include/jffs2/load_kernel.h b/include/jffs2/load_kernel.h
index 9346d7ee9f1..fa4600e84fc 100644
--- a/include/jffs2/load_kernel.h
+++ b/include/jffs2/load_kernel.h
@@ -10,6 +10,7 @@
*-----------------------------------------------------------------------*/
#include <linux/list.h>
+#include <linux/string.h>
/* mtd device types */
#define MTD_DEV_TYPE_NOR 0x0001
diff --git a/include/libata.h b/include/libata.h
index a55e9315a73..fa39d21a44a 100644
--- a/include/libata.h
+++ b/include/libata.h
@@ -10,6 +10,7 @@
#ifndef __LIBATA_H__
#define __LIBATA_H__
+#include <linux/types.h>
enum {
/* various global constants */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index f8e3570d1ad..62381451617 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -5,6 +5,7 @@
#include <cyclic.h>
#include <log.h>
#include <malloc.h>
+#include <time.h>
#include <asm/processor.h>
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
index f08e700a1da..2dbf988863f 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>
+
/* Maximum Number of Chip Selects */
#define GPMC_CS_NUM 8
diff --git a/include/mailbox.h b/include/mailbox.h
index 323b6c2bc5d..e70266fb61c 100644
--- a/include/mailbox.h
+++ b/include/mailbox.h
@@ -6,6 +6,8 @@
#ifndef _MAILBOX_H
#define _MAILBOX_H
+#include <linux/types.h>
+
/**
* A mailbox is a hardware mechanism for transferring small fixed-size messages
* and/or notifications between the CPU on which U-Boot runs and some other
diff --git a/include/mmc.h b/include/mmc.h
index 4b8327f1f93..7f1900363b9 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -18,13 +18,6 @@
struct bd_info;
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
-#define MMC_SUPPORTS_TUNING
-#endif
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
-#define MMC_SUPPORTS_TUNING
-#endif
-
/* SD/MMC version bits; 8 flags, 8 major, 8 minor, 8 change */
#define SD_VERSION_SD (1U << 31)
#define MMC_VERSION_MMC (1U << 30)
@@ -485,7 +478,7 @@ struct dm_mmc_ops {
*/
int (*get_wp)(struct udevice *dev);
-#ifdef MMC_SUPPORTS_TUNING
+#if CONFIG_IS_ENABLED(MMC_SUPPORTS_TUNING)
/**
* execute_tuning() - Start the tuning process
*
diff --git a/include/mpc85xx.h b/include/mpc85xx.h
index 636734dd3c6..ff86c7c12e0 100644
--- a/include/mpc85xx.h
+++ b/include/mpc85xx.h
@@ -6,6 +6,7 @@
#ifndef __MPC85xx_H__
#define __MPC85xx_H__
+#include <config.h>
#if defined(CONFIG_E500)
#include <e500.h>
#endif
diff --git a/include/nand.h b/include/nand.h
index 220ffa202ef..cdba7384ad1 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -8,8 +8,6 @@
#ifndef _NAND_H_
#define _NAND_H_
-#include <config.h>
-
extern void nand_init(void);
void nand_reinit(void);
unsigned long nand_size(void);
diff --git a/include/netdev.h b/include/netdev.h
index 2a7f40e5040..2a06d9a261b 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -10,9 +10,12 @@
#ifndef _NETDEV_H_
#define _NETDEV_H_
+
+#include <linux/types.h>
#include <phy_interface.h>
struct udevice;
+struct bd_info;
/*
* Board and CPU-specific initialization functions
diff --git a/include/pci.h b/include/pci.h
index aad233769a3..ea3b73923d6 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -520,6 +520,7 @@
#ifndef __ASSEMBLY__
+#include <linux/types.h>
#include <dm/pci.h>
#ifdef CONFIG_SYS_PCI_64BIT
diff --git a/include/phy_interface.h b/include/phy_interface.h
index 31be3228c7c..b74f4ccd84a 100644
--- a/include/phy_interface.h
+++ b/include/phy_interface.h
@@ -11,6 +11,7 @@
#define _PHY_INTERFACE_H
#include <string.h>
+#include <linux/kernel.h>
typedef enum {
PHY_INTERFACE_MODE_NA, /* don't touch */
diff --git a/include/ram.h b/include/ram.h
index 2fc971df465..3600bb57a6c 100644
--- a/include/ram.h
+++ b/include/ram.h
@@ -7,6 +7,8 @@
#ifndef __RAM_H
#define __RAM_H
+#include <linux/types.h>
+
struct udevice;
struct ram_info {
diff --git a/include/s_record.h b/include/s_record.h
index 3ece695941d..aab09d9c3c8 100644
--- a/include/s_record.h
+++ b/include/s_record.h
@@ -4,6 +4,8 @@
* Wolfgang Denk, DENX Software Engineering, [email protected].
*/
+#include <linux/types.h>
+
/*--------------------------------------------------------------------------
*
* Motorola S-Record Format:
diff --git a/include/sm.h b/include/sm.h
index afa9c89055e..fbc156ad68a 100644
--- a/include/sm.h
+++ b/include/sm.h
@@ -19,7 +19,7 @@
* implementation of the driver you are using.
*/
-#include <asm/types.h>
+#include <linux/types.h>
#include <asm/ptrace.h>
struct udevice;
diff --git a/include/splash.h b/include/splash.h
index c3922375987..83c6fa9767f 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -23,6 +23,7 @@
#define _SPLASH_H_
#include <errno.h>
+#include <linux/types.h>
enum splash_storage {
SPLASH_STORAGE_NAND,
diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h
index 09fee594d26..c1e9f67068d 100644
--- a/include/u-boot/sha1.h
+++ b/include/u-boot/sha1.h
@@ -14,6 +14,8 @@
#ifndef _SHA1_H
#define _SHA1_H
+#include <linux/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h
index 9aa1251789a..a4fe176c0b4 100644
--- a/include/u-boot/sha256.h
+++ b/include/u-boot/sha256.h
@@ -1,6 +1,8 @@
#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..90bd96a3f8c 100644
--- a/include/u-boot/sha512.h
+++ b/include/u-boot/sha512.h
@@ -1,6 +1,8 @@
#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/virtio.h b/include/virtio.h
index 062a24630ce..1ab0ec5f39f 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -23,6 +23,7 @@
#include <virtio_types.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/typecheck.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/xen/events.h b/include/xen/events.h
index 82bd18b48c8..f0a8ef32d00 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -15,6 +15,7 @@
#ifndef _EVENTS_H_
#define _EVENTS_H_
+#include <asm/ptrace.h>
#include <asm/xen/hypercall.h>
#include <xen/interface/event_channel.h>