summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/daisy/romstage.c21
-rw-r--r--src/mainboard/google/peach_pit/romstage.c17
-rw-r--r--src/mainboard/google/veyron/romstage.c11
-rw-r--r--src/mainboard/google/veyron_mickey/romstage.c11
-rw-r--r--src/mainboard/google/veyron_rialto/romstage.c13
5 files changed, 58 insertions, 15 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();
diff --git a/src/mainboard/google/peach_pit/romstage.c b/src/mainboard/google/peach_pit/romstage.c
index 3509a45777..91487807cc 100644
--- a/src/mainboard/google/peach_pit/romstage.c
+++ b/src/mainboard/google/peach_pit/romstage.c
@@ -9,6 +9,7 @@
#include <device/i2c_simple.h>
#include <drivers/maxim/max77802/max77802.h>
#include <program_loading.h>
+#include <romstage_common.h>
#include <soc/clk.h>
#include <soc/cpu.h>
#include <soc/dmc.h>
@@ -203,6 +204,19 @@ static void simple_spi_test(void)
void main(void)
{
+ 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)
+{
extern struct mem_timings mem_timings;
int is_resume = (get_wakeup_state() != IS_NOT_WAKEUP);
@@ -211,9 +225,6 @@ void main(void)
exynos5420_config_smp();
power_init_failed = setup_power(is_resume);
- timestamp_init(timestamp_get());
- timestamp_add_now(TS_ROMSTAGE_START);
-
/* Clock must be initialized before console_init, otherwise you may need
* to re-initialize serial console drivers again. */
system_clock_init();
diff --git a/src/mainboard/google/veyron/romstage.c b/src/mainboard/google/veyron/romstage.c
index de4617c24e..488f581a76 100644
--- a/src/mainboard/google/veyron/romstage.c
+++ b/src/mainboard/google/veyron/romstage.c
@@ -8,11 +8,12 @@
#include <console/console.h>
#include <device/mmio.h>
#include <program_loading.h>
-#include <soc/sdram.h>
+#include <romstage_common.h>
#include <soc/clock.h>
-#include <soc/pwm.h>
#include <soc/grf.h>
+#include <soc/pwm.h>
#include <soc/rk808.h>
+#include <soc/sdram.h>
#include <soc/tsadc.h>
#include <symbols.h>
#include <timestamp.h>
@@ -68,6 +69,12 @@ void main(void)
console_init();
exception_init();
+
+ romstage_main();
+}
+
+void __noreturn romstage_main(void)
+{
configure_l2ctlr();
tsadc_init();
diff --git a/src/mainboard/google/veyron_mickey/romstage.c b/src/mainboard/google/veyron_mickey/romstage.c
index fb0230a7d2..c718ed7966 100644
--- a/src/mainboard/google/veyron_mickey/romstage.c
+++ b/src/mainboard/google/veyron_mickey/romstage.c
@@ -8,11 +8,12 @@
#include <console/console.h>
#include <device/mmio.h>
#include <program_loading.h>
-#include <soc/sdram.h>
+#include <romstage_common.h>
#include <soc/clock.h>
-#include <soc/pwm.h>
#include <soc/grf.h>
+#include <soc/pwm.h>
#include <soc/rk808.h>
+#include <soc/sdram.h>
#include <soc/tsadc.h>
#include <symbols.h>
#include <timestamp.h>
@@ -62,6 +63,12 @@ void main(void)
console_init();
exception_init();
+
+ romstage_main();
+}
+
+void __noreturn romstage_main(void)
+{
configure_l2ctlr();
tsadc_init();
diff --git a/src/mainboard/google/veyron_rialto/romstage.c b/src/mainboard/google/veyron_rialto/romstage.c
index db2e343280..488f581a76 100644
--- a/src/mainboard/google/veyron_rialto/romstage.c
+++ b/src/mainboard/google/veyron_rialto/romstage.c
@@ -2,17 +2,18 @@
#include <arch/cache.h>
#include <arch/exception.h>
-#include <device/mmio.h>
#include <armv7.h>
#include <assert.h>
#include <cbmem.h>
#include <console/console.h>
+#include <device/mmio.h>
#include <program_loading.h>
-#include <soc/sdram.h>
+#include <romstage_common.h>
#include <soc/clock.h>
-#include <soc/pwm.h>
#include <soc/grf.h>
+#include <soc/pwm.h>
#include <soc/rk808.h>
+#include <soc/sdram.h>
#include <soc/tsadc.h>
#include <symbols.h>
#include <timestamp.h>
@@ -68,6 +69,12 @@ void main(void)
console_init();
exception_init();
+
+ romstage_main();
+}
+
+void __noreturn romstage_main(void)
+{
configure_l2ctlr();
tsadc_init();