From 121a165c51cd281e61c9d45c3919608af42ca9cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Mon, 2 Aug 2021 15:18:38 +0200 Subject: [PATCH] Remove including timestamp.h in version.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Header file version.h does not use anything from timestamp.h. Including of timestamp.h has side effect which cause recompiling object file at every make run because timestamp.h changes at every run. So remove timestamp.h from version.h and include timestamp.h in files which needs it. This change reduce recompilation time of final U-Boot binary when U-Boot source files were not changed as less source files needs to be recompiled. Signed-off-by: Pali Rohár Reviewed-by: Simon Glass Reviewed-by: Tom Rini [trini: Add in lib/acpi/acpi_table.c and test/dm/acpi.c, rework a few others] Signed-off-by: Tom Rini --- arch/arm/mach-rockchip/tpl.c | 4 ++++ board/work-microwave/work_92105/work_92105_display.c | 1 + cmd/version.c | 1 + common/spl/spl.c | 3 +++ drivers/rtc/emul_rtc.c | 2 +- include/version.h | 2 -- lib/acpi/acpi_table.c | 1 + test/dm/acpi.c | 1 + 8 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index cca638bbef..3c007bb450 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -16,6 +16,10 @@ #include #include +#if CONFIG_IS_ENABLED(BANNER_PRINT) +#include +#endif + #define TIMER_LOAD_COUNT_L 0x00 #define TIMER_LOAD_COUNT_H 0x04 #define TIMER_CONTROL_REG 0x10 diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c index e8e559ce1f..5f625e6f52 100644 --- a/board/work-microwave/work_92105/work_92105_display.c +++ b/board/work-microwave/work_92105/work_92105_display.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/version.c b/cmd/version.c index 130e31cd84..f83f6aff92 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/spl/spl.c b/common/spl/spl.c index 2a9f54ef70..31516e1eed 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -24,6 +24,9 @@ #include #include #include +#if CONFIG_IS_ENABLED(BANNER_PRINT) +#include +#endif #include #include #include diff --git a/drivers/rtc/emul_rtc.c b/drivers/rtc/emul_rtc.c index 8f0e1ab5ac..6f47d82522 100644 --- a/drivers/rtc/emul_rtc.c +++ b/drivers/rtc/emul_rtc.c @@ -9,8 +9,8 @@ #include #include #include -#include #include +#include /** * struct emul_rtc - private data for emulated RTC driver diff --git a/include/version.h b/include/version.h index 8ee07134fd..5955b21e89 100644 --- a/include/version.h +++ b/include/version.h @@ -7,8 +7,6 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -#include - #ifndef DO_DEPS_ONLY #include "generated/version_autogenerated.h" #endif diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c index 2f07741784..7ea4b2e87e 100644 --- a/lib/acpi/acpi_table.c +++ b/lib/acpi/acpi_table.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 2edab7be54..6f0025814e 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include -- 2.39.5