diff mbox series

[v3,09/22] common: Drop bootstage.h from common header

Message ID 20200510113946.v3.9.Ia0734abcbcaf5854c98eaee1452bd6d54d1e5818@changeid
State Accepted
Commit 52f24238046ca28085f6de946d0358e5c7c7cbe8
Headers show
Series common: Further reduce the size of common.h | expand

Commit Message

Simon Glass May 10, 2020, 5:40 p.m. UTC
Move this fairly uncommon header out of the common header.

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

Changes in v3: None
Changes in v2: None

 arch/arc/lib/bootm.c                    | 3 ++-
 arch/arm/cpu/armv8/generic_timer.c      | 1 +
 arch/arm/lib/bootm.c                    | 1 +
 arch/m68k/lib/bootm.c                   | 1 +
 arch/microblaze/lib/bootm.c             | 1 +
 arch/mips/lib/bootm.c                   | 1 +
 arch/nds32/lib/bootm.c                  | 1 +
 arch/powerpc/lib/bootm.c                | 1 +
 arch/riscv/lib/bootm.c                  | 1 +
 arch/sandbox/cpu/cpu.c                  | 1 +
 arch/sandbox/lib/bootm.c                | 1 +
 arch/x86/cpu/apollolake/fsp_s.c         | 1 +
 arch/x86/cpu/apollolake/spl.c           | 1 +
 arch/x86/cpu/coreboot/timestamp.c       | 1 +
 arch/x86/cpu/cpu.c                      | 1 +
 arch/x86/lib/bootm.c                    | 1 +
 arch/x86/lib/fsp2/fsp_init.c            | 1 +
 arch/x86/lib/fsp2/fsp_meminit.c         | 1 +
 arch/x86/lib/fsp2/fsp_silicon_init.c    | 1 +
 arch/xtensa/lib/bootm.c                 | 1 +
 board/Seagate/dockstar/dockstar.c       | 1 +
 board/Seagate/goflexhome/goflexhome.c   | 1 +
 board/armltd/integrator/integrator.c    | 1 +
 board/armltd/vexpress/vexpress_common.c | 1 +
 board/bosch/shc/board.c                 | 1 +
 board/buffalo/lsxl/lsxl.c               | 1 +
 board/gdsys/p1022/controlcenterd-id.c   | 1 +
 board/st/stv0991/stv0991.c              | 1 +
 board/technexion/tao3530/tao3530.c      | 1 +
 board/ti/beagle/beagle.c                | 1 +
 cmd/bootstage.c                         | 1 +
 cmd/disk.c                              | 1 +
 cmd/nand.c                              | 1 +
 cmd/net.c                               | 1 +
 cmd/usb.c                               | 1 +
 common/board_f.c                        | 1 +
 common/board_r.c                        | 1 +
 common/bootm_os.c                       | 1 +
 common/bootstage.c                      | 1 +
 common/cli.c                            | 1 +
 common/image.c                          | 1 +
 common/init/board_init.c                | 1 +
 common/main.c                           | 1 +
 common/spl/spl.c                        | 1 +
 drivers/pci/pci_rom.c                   | 1 +
 drivers/scsi/scsi.c                     | 1 +
 drivers/spi/ich.c                       | 1 +
 drivers/timer/cadence-ttc.c             | 1 +
 drivers/timer/rockchip_timer.c          | 1 +
 drivers/timer/tsc_timer.c               | 1 +
 drivers/video/broadwell_igd.c           | 1 +
 drivers/video/tegra124/display.c        | 1 +
 env/common.c                            | 1 +
 include/common.h                        | 1 -
 lib/time.c                              | 1 +
 net/bootp.c                             | 1 +
 net/eth-uclass.c                        | 1 +
 net/eth_common.c                        | 1 +
 net/eth_legacy.c                        | 1 +
 net/net.c                               | 1 +
 post/post.c                             | 1 +
 61 files changed, 61 insertions(+), 2 deletions(-)

Comments

Tom Rini May 19, 2020, 5:32 p.m. UTC | #1
On Sun, May 10, 2020 at 11:40:00AM -0600, Simon Glass wrote:

> Move this fairly uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index d38c18ef8f..1b08ffe285 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -3,9 +3,10 @@ 
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
+#include <common.h>
+#include <bootstage.h>
 #include <irq_func.h>
 #include <asm/cache.h>
-#include <common.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 46e63294fe..6fe3ede387 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <time.h>
 #include <asm/system.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index dc845a997f..c189bdcf9a 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -12,6 +12,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 19445b3fc7..fb1170d00d 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 87d2d6ee70..f7303b790f 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -8,6 +8,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index f1db6d23b8..6a6764ac2d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <image.h>
 #include <fdt_support.h>
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 1003bc87b9..b17368647d 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <hang.h>
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 390e8c0673..1cef75c4be 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -8,6 +8,7 @@ 
 
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 0d06095da1..c24aba1dc9 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <dm.h>
 #include <fdt_support.h>
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 56ee3f5826..842640c50e 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -4,6 +4,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 2de03fb8e0..d38c3164c1 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <asm/io.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 7ef169b147..fd6e73dfc8 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -6,6 +6,7 @@ 
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <irq.h>
 #include <malloc.h>
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index d32f2a9898..a555e6c0d3 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -5,6 +5,7 @@ 
 
 #include <common.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <malloc.h>
 #include <spi.h>
diff --git a/arch/x86/cpu/coreboot/timestamp.c b/arch/x86/cpu/coreboot/timestamp.c
index e8ccaf2212..0162597809 100644
--- a/arch/x86/cpu/coreboot/timestamp.c
+++ b/arch/x86/cpu/coreboot/timestamp.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <asm/arch/timestamp.h>
 #include <asm/arch/sysinfo.h>
 #include <linux/compiler.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 2e5d0ddd9f..e0f23bb509 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -19,6 +19,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 07d8f1f279..0837655e12 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -8,6 +8,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <hang.h>
 #include <dm/device.h>
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index c7dc2ea257..008e8aeb36 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -6,6 +6,7 @@ 
 #include <common.h>
 #include <binman.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <cbfs.h>
 #include <dm.h>
 #include <init.h>
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 300be8b093..117f36a848 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -8,6 +8,7 @@ 
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <asm/mrccache.h>
 #include <asm/fsp/fsp_infoheader.h>
 #include <asm/fsp2/fsp_api.h>
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index 66a3cb39f1..28c15a22a2 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -10,6 +10,7 @@ 
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <asm/arch/fsp/fsp_configs.h>
 #include <asm/arch/fsp/fsp_s_upd.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 057b229433..458eaf95c0 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 5a8c6e282b..0ff8a9053e 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -9,6 +9,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/soc.h>
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index 1e4477aa5f..fd2f0df371 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -12,6 +12,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 32e4933d20..ac6462d7ff 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -17,6 +17,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <env.h>
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index ebd3322c6f..9dc26b949e 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -16,6 +16,7 @@ 
  * Philippe Robin, <philippe.robin at arm.com>
  */
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 9698d8ee16..6e0ad4b53f 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -12,6 +12,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <errno.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index aa641259ac..56a2c29e4c 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -8,6 +8,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index ad56dd7d01..3da5005f40 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -11,6 +11,7 @@ 
 #endif
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <dm.h>
 #include <env.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index f193e83361..fbcb87092b 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 7d7c427392..b604ee951b 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -4,6 +4,7 @@ 
  *      Tapani Utriainen <linuxfae at technexion.com>
  */
 #include <common.h>
+#include <bootstage.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index cb3a12ec37..439b023da8 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -13,6 +13,7 @@ 
  *
  */
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <net.h>
diff --git a/cmd/bootstage.c b/cmd/bootstage.c
index ed0b0ff1fc..f1ea4e9598 100644
--- a/cmd/bootstage.c
+++ b/cmd/bootstage.c
@@ -4,6 +4,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 
 static int do_bootstage_report(cmd_tbl_t *cmdtp, int flag, int argc,
 			       char * const argv[])
diff --git a/cmd/disk.c b/cmd/disk.c
index 9e008a3889..da0660148c 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -4,6 +4,7 @@ 
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  */
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <image.h>
diff --git a/cmd/nand.c b/cmd/nand.c
index 9c2b5d718e..c42ab24ec0 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -20,6 +20,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <image.h>
 #include <asm/cache.h>
 #include <linux/mtd/mtd.h>
diff --git a/cmd/net.c b/cmd/net.c
index 1b724cc570..282b38ccf9 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -8,6 +8,7 @@ 
  * Boot support
  */
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <image.h>
diff --git a/cmd/usb.c b/cmd/usb.c
index 98fa300dfe..858be726a4 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -12,6 +12,7 @@ 
 
 #include <common.h>
 #include <blk.h>
+#include <bootstage.h>
 #include <command.h>
 #include <console.h>
 #include <dm.h>
diff --git a/common/board_f.c b/common/board_f.c
index 797f1370d8..b2f062e2aa 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -11,6 +11,7 @@ 
 
 #include <common.h>
 #include <bloblist.h>
+#include <bootstage.h>
 #include <clock_legacy.h>
 #include <console.h>
 #include <cpu.h>
diff --git a/common/board_r.c b/common/board_r.c
index 30082d1acb..a47b60a7a9 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -11,6 +11,7 @@ 
 
 #include <common.h>
 #include <api.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <exports.h>
 #include <flash.h>
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1d58462509..44023532e1 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -6,6 +6,7 @@ 
 
 #include <common.h>
 #include <bootm.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <env.h>
diff --git a/common/bootstage.c b/common/bootstage.c
index d2ed33663b..817f85a7fe 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -10,6 +10,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <hang.h>
 #include <malloc.h>
 #include <sort.h>
diff --git a/common/cli.c b/common/cli.c
index 38bba17585..e5e5894b2f 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -9,6 +9,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cli.h>
 #include <cli_hush.h>
 #include <command.h>
diff --git a/common/image.c b/common/image.c
index 14e27fbe3c..20fa4bd497 100644
--- a/common/image.c
+++ b/common/image.c
@@ -8,6 +8,7 @@ 
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <malloc.h>
diff --git a/common/init/board_init.c b/common/init/board_init.c
index f7c8a173ff..4c4f0ced53 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/main.c b/common/main.c
index 64287f7dee..4b3cd302c3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -8,6 +8,7 @@ 
 
 #include <common.h>
 #include <autoboot.h>
+#include <bootstage.h>
 #include <cli.h>
 #include <command.h>
 #include <console.h>
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 472bb0a5e2..ab62b8b79e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -9,6 +9,7 @@ 
 #include <common.h>
 #include <bloblist.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <handoff.h>
 #include <hang.h>
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 6b17f18bc0..2f3d40c227 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -24,6 +24,7 @@ 
 
 #include <common.h>
 #include <bios_emul.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 849c42f0cd..949e364e78 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -6,6 +6,7 @@ 
 
 #include <common.h>
 #include <blk.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <part.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index a9d7715a55..990a5ffa51 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -8,6 +8,7 @@ 
 #define LOG_CATEGORY	UCLASS_SPI
 
 #include <common.h>
+#include <bootstage.h>
 #include <div64.h>
 #include <dm.h>
 #include <dt-structs.h>
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index ed48a145f2..4837b0645b 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -4,6 +4,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <timer.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 54956e557a..0cbdc279a5 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -4,6 +4,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <dm/ofnode.h>
 #include <mapmem.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 43cb2d820e..04596ff117 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <malloc.h>
 #include <time.h>
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index c23421d25b..86c4c10b38 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -7,6 +7,7 @@ 
 
 #include <common.h>
 #include <bios_emul.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <init.h>
 #include <vbe.h>
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 913beab4d4..a552f38cd0 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <edid.h>
 #include <errno.h>
diff --git a/env/common.c b/env/common.c
index 1fd1bd01d3..0256b3e356 100644
--- a/env/common.c
+++ b/env/common.c
@@ -8,6 +8,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
diff --git a/include/common.h b/include/common.h
index 85a211554a..fd3e2de4cc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -35,7 +35,6 @@ 
 #include <init.h>
 #include <display_options.h>
 #include <vsprintf.h>
-#include <bootstage.h>
 #endif	/* __ASSEMBLY__ */
 
 /* Pull in stuff for the build system */
diff --git a/lib/time.c b/lib/time.c
index 75de48f900..1395f28715 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <time.h>
diff --git a/net/bootp.c b/net/bootp.c
index 2c918d8379..05bfede14a 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -9,6 +9,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <efi_loader.h>
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 8bf2eabe90..c4baf1c3a5 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <net.h>
diff --git a/net/eth_common.c b/net/eth_common.c
index ed26b1b693..58f899a024 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <miiphy.h>
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 5d6b0d7d7f..e0ef4a11a7 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <net.h>
diff --git a/net/net.c b/net/net.c
index 087d399a24..035293537b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,6 +88,7 @@ 
 
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <console.h>
 #include <env.h>
diff --git a/post/post.c b/post/post.c
index 696a60f70a..0f977fe245 100644
--- a/post/post.c
+++ b/post/post.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <malloc.h>
 #include <stdio_dev.h>