summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-08-02 15:18:38 +0200
committerTom Rini <trini@konsulko.com>2021-09-01 16:17:19 -0400
commit1c9b8d42307596d9f798d0da20fac5c536f746b4 (patch)
tree889984e5cdf1f2601213c89c59c750a28a7f3c3b
parentf7cbafe4f7822d2c514b9560cdb01641a8c50fb3 (diff)
downloadu-boot-WIP/2021-09-01-reduce-timestamp-usage.tar.gz
Remove including timestamp.h in version.hWIP/2021-09-01-reduce-timestamp-usage
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 <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fixup lib/acpi/acpi_table.c and test/dm/acpi.c] Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--arch/arm/mach-rockchip/tpl.c4
-rw-r--r--board/work-microwave/work_92105/work_92105_display.c1
-rw-r--r--cmd/version.c1
-rw-r--r--common/spl/spl.c4
-rw-r--r--drivers/rtc/emul_rtc.c2
-rw-r--r--include/version.h2
-rw-r--r--lib/acpi/acpi_table.c1
-rw-r--r--test/dm/acpi.c2
8 files changed, 13 insertions, 4 deletions
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index cc908e1b0e..56c65149eb 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -16,6 +16,10 @@
#include <asm/arch-rockchip/bootrom.h>
#include <linux/bitops.h>
+#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT) && defined(CONFIG_TPL_BANNER_PRINT)
+#include <timestamp.h>
+#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 <env.h>
#include <spi.h>
#include <i2c.h>
+#include <timestamp.h>
#include <version.h>
#include <vsprintf.h>
#include <linux/delay.h>
diff --git a/cmd/version.c b/cmd/version.c
index 42eb85b75b..11a5d5d9f1 100644
--- a/cmd/version.c
+++ b/cmd/version.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <timestamp.h>
#include <version.h>
#include <version_string.h>
#include <linux/compiler.h>
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d55d3c2848..3c04b75ab8 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -34,6 +34,10 @@
#include <bootcount.h>
#include <wdt.h>
+#if defined(CONFIG_SPL_SERIAL_SUPPORT) && CONFIG_IS_ENABLED(BANNER_PRINT)
+#include <timestamp.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_SYS_UBOOT_START
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 <div64.h>
#include <dm.h>
#include <env.h>
-#include <generated/timestamp_autogenerated.h>
#include <rtc.h>
+#include <timestamp.h>
/**
* 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 <timestamp.h>
-
#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..af467f378d 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -12,6 +12,7 @@
#include <mapmem.h>
#include <tables_csum.h>
#include <version.h>
+#include <timestamp.h>
#include <acpi/acpi_table.h>
#include <asm/global_data.h>
#include <dm/acpi.h>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 2edab7be54..9504bc3149 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -12,8 +12,8 @@
#include <malloc.h>
#include <mapmem.h>
#include <version.h>
+#include <timestamp.h>
#include <tables_csum.h>
-#include <version.h>
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
#include <acpi/acpi_table.h>