diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-04-06 22:25:50 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-07-20 20:28:39 +0000 |
commit | 3e914d372661ba68ca92d476708bd68af2593b10 (patch) | |
tree | d387bc1342a0653b7fcbf53bb8c2b3034d630fc3 /src/mainboard/google/daisy | |
parent | a91821b677b0162e07f0f4e31b738d46992dccaf (diff) |
arch/arm64,arm: Prepare for !SEPARATE_ROMSTAGE
Prepare platforms for linking romstage code in the bootblock.
Change-Id: Ic20799b4d6e3f62cd05791a2bd275000a12cc83c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63420
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/google/daisy')
-rw-r--r-- | src/mainboard/google/daisy/romstage.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/mainboard/google/daisy/romstage.c b/src/mainboard/google/daisy/romstage.c index dd3bc72000..d9ae00cced 100644 --- a/src/mainboard/google/daisy/romstage.c +++ b/src/mainboard/google/daisy/romstage.c @@ -4,17 +4,18 @@ #include <armv7.h> #include <cbmem.h> #include <console/console.h> -#include <program_loading.h> #include <device/i2c_simple.h> #include <drivers/maxim/max77686/max77686.h> +#include <program_loading.h> +#include <romstage_common.h> #include <soc/clk.h> #include <soc/cpu.h> #include <soc/dmc.h> #include <soc/gpio.h> #include <soc/i2c.h> -#include <soc/setup.h> #include <soc/periph.h> #include <soc/power.h> +#include <soc/setup.h> #include <soc/trustzone.h> #include <soc/wakeup.h> #include <timestamp.h> @@ -119,12 +120,22 @@ static struct mem_timings *setup_clock(void) void main(void) { - struct mem_timings *mem; - int is_resume = (get_wakeup_state() != IS_NOT_WAKEUP); - timestamp_init(timestamp_get()); timestamp_add_now(TS_ROMSTAGE_START); + /* + * From the clocks comment below it looks like serial console won't + * work in the bootblock so keep in the romstage_main flow even with + * !CONFIG SEPARATE_ROMSTAGE. + */ + romstage_main(); +} + +void __noreturn romstage_main(void) +{ + struct mem_timings *mem; + int is_resume = (get_wakeup_state() != IS_NOT_WAKEUP); + /* Clock must be initialized before console_init, otherwise you may need * to re-initialize serial console drivers again. */ mem = setup_clock(); |