diff mbox series

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

Message ID 20200409141439.v2.9.Ia0734abcbcaf5854c98eaee1452bd6d54d1e5818@changeid
State Superseded
Headers show
Series common: Further reduce the size of common.h | expand

Commit Message

Simon Glass April 9, 2020, 8:14 p.m. UTC
Move this fairly uncommon header out of the common header.

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

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(-)
diff mbox series

Patch

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index d38c18ef8f4..1b08ffe2857 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 46e63294fef..6fe3ede387b 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 3e387e49e70..37fc727601c 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 19445b3fc7a..fb1170d00d7 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 87d2d6ee70d..f7303b790fc 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 8c0d7672f24..9be9d18ac85 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 1003bc87b9d..b17368647d3 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 390e8c0673c..1cef75c4bef 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 fad16901c5f..d2f7ddcd2d1 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 56ee3f58260..842640c50ed 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 2de03fb8e02..d38c3164c12 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 1f22c1ea3c6..35fe029a244 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -7,6 +7,7 @@ 
 #include <common.h>
 #include <acpi_s3.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 d32f2a98987..a555e6c0d38 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 e698200d704..d37925bc80d 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 dae06949cc6..7d48f95c3f4 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -20,6 +20,7 @@ 
 
 #include <common.h>
 #include <acpi_s3.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 07d8f1f279c..0837655e124 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 da9bd6b45cf..c65e8c8d63c 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 300be8b093f..117f36a8482 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 66a3cb39f18..28c15a22a2e 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 057b229433e..458eaf95c04 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 5a8c6e282bf..0ff8a9053e7 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 1e4477aa5ff..fd2f0df371a 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 32e4933d20a..ac6462d7ff5 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 ebd3322c6fc..9dc26b949eb 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 9698d8ee16a..6e0ad4b53f8 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 aa641259ac6..56a2c29e4c7 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 ad56dd7d019..3da5005f403 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 f193e833619..fbcb87092b2 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 7d7c427392f..b604ee951b4 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 cb3a12ec373..439b023da82 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 ed0b0ff1fc8..f1ea4e95982 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 9e008a38890..da0660148c1 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 9c2b5d718ef..c42ab24ec06 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 1b724cc5709..282b38ccf99 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 98fa300dfe4..858be726a47 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 c32a77a95b8..a53a5e518dc 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 46806fe8611..2eef614885b 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 1d58462509c..44023532e13 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 d2ed33663b7..817f85a7fee 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 38bba17585c..e5e5894b2fa 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 ed712804561..dea66cf0d4d 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 f7c8a173ffb..4c4f0ced535 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 09333651586..9ce5c70ff39 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 0526cd7718d..d5b6c40e59e 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 90f224b0452..fbedd4f38a9 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 849c42f0cd2..949e364e78b 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 a9d7715a556..990a5ffa513 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 ed48a145f2c..4837b0645b6 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 54956e557a1..0cbdc279a56 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 43cb2d820e8..04596ff1174 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 c23421d25be..86c4c10b386 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 913beab4d49..a552f38cd07 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 1fd1bd01d3b..0256b3e3567 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 85a211554a1..fd3e2de4cce 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 75de48f9003..1395f28715c 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 2c918d83796..05bfede14a5 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 8bf2eabe902..c4baf1c3a56 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 ed26b1b6935..58f899a0240 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 5d6b0d7d7f4..e0ef4a11a7a 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 087d399a24b..035293537b8 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 696a60f70a7..0f977fe2450 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>