[coreboot-gerrit] New patch to review for coreboot: marvel/bg4cd: move timestamp init to SoC code
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Jul 7 19:35:45 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10825
-gerrit
commit 89a401f6193d6fd505b673aeb3f608660b9fa8ff
Author: Patrick Georgi <pgeorgi at google.com>
Date: Tue Jul 7 19:25:14 2015 +0200
marvel/bg4cd: move timestamp init to SoC code
No need to repeat this in the mainboard code (even if there's only one right
now).
Change-Id: Iaa3508c27f8c38cfa343ab1d8a094ce922dec157
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
src/mainboard/google/cosmos/romstage.c | 28 +++++++---------------------
src/soc/marvell/bg4cd/bootblock.c | 2 ++
2 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/src/mainboard/google/cosmos/romstage.c b/src/mainboard/google/cosmos/romstage.c
index 0988bee..e10b3ac 100644
--- a/src/mainboard/google/cosmos/romstage.c
+++ b/src/mainboard/google/cosmos/romstage.c
@@ -37,37 +37,23 @@
void main(void)
{
-#if CONFIG_COLLECT_TIMESTAMPS
- uint64_t start_romstage_time;
- uint64_t before_dram_time;
- uint64_t after_dram_time;
- uint64_t base_time = timestamp_get();
- start_romstage_time = timestamp_get();
-#endif
+ timestamp_add_now(TS_START_ROMSTAGE);
console_init();
-#if CONFIG_COLLECT_TIMESTAMPS
- before_dram_time = timestamp_get();
-#endif
+ timestamp_add_now(TS_BEFORE_INITRAM);
+
sdram_init();
-#if CONFIG_COLLECT_TIMESTAMPS
- after_dram_time = timestamp_get();
-#endif
+
+ timestamp_add_now(TS_AFTER_INITRAM);
+
mmu_init();
mmu_config_range(0, 4096, DCACHE_OFF);
dcache_mmu_enable();
cbmem_initialize_empty();
-#if CONFIG_COLLECT_TIMESTAMPS
- timestamp_init(base_time);
- timestamp_add(TS_START_ROMSTAGE, start_romstage_time);
- timestamp_add(TS_BEFORE_INITRAM, before_dram_time);
- timestamp_add(TS_AFTER_INITRAM, after_dram_time);
-#endif
-#if CONFIG_COLLECT_TIMESTAMPS
timestamp_add_now(TS_END_ROMSTAGE);
-#endif
+
run_ramstage();
}
diff --git a/src/soc/marvell/bg4cd/bootblock.c b/src/soc/marvell/bg4cd/bootblock.c
index e7893fe..79b9d3f 100644
--- a/src/soc/marvell/bg4cd/bootblock.c
+++ b/src/soc/marvell/bg4cd/bootblock.c
@@ -19,10 +19,12 @@
#include <console/console.h>
#include <program_loading.h>
+#include <timestamp.h>
#include <vendorcode/google/chromeos/chromeos.h>
void main(void)
{
console_init();
+ timestamp_init(timestamp_get());
run_romstage();
}
More information about the coreboot-gerrit
mailing list