summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/cheza/romstage.c13
-rw-r--r--src/mainboard/google/gru/romstage.c18
-rw-r--r--src/mainboard/google/kukui/romstage.c15
-rw-r--r--src/mainboard/google/oak/romstage.c31
4 files changed, 10 insertions, 67 deletions
diff --git a/src/mainboard/google/cheza/romstage.c b/src/mainboard/google/cheza/romstage.c
index c930016080..ad8506193d 100644
--- a/src/mainboard/google/cheza/romstage.c
+++ b/src/mainboard/google/cheza/romstage.c
@@ -13,17 +13,8 @@
* GNU General Public License for more details.
*/
-#include <arch/exception.h>
-#include <cbmem.h>
-#include <halt.h>
-#include <program_loading.h>
-#include <console/console.h>
-#include <timestamp.h>
+#include <arch/stages.h>
-void main(void)
+void platform_romstage_main(void)
{
- console_init();
- exception_init();
- cbmem_initialize_empty();
- run_ramstage();
}
diff --git a/src/mainboard/google/gru/romstage.c b/src/mainboard/google/gru/romstage.c
index 9f938f3eb2..edf440d00e 100644
--- a/src/mainboard/google/gru/romstage.c
+++ b/src/mainboard/google/gru/romstage.c
@@ -14,24 +14,14 @@
*
*/
-#include <arch/cache.h>
-#include <arch/cpu.h>
-#include <arch/exception.h>
#include <arch/mmu.h>
-#include <cbfs.h>
-#include <cbmem.h>
-#include <gpio.h>
-#include <console/console.h>
+#include <arch/stages.h>
#include <delay.h>
-#include <program_loading.h>
-#include <romstage_handoff.h>
-#include <soc/addressmap.h>
#include <soc/mmu_operations.h>
#include <soc/tsadc.h>
#include <soc/sdram.h>
#include <symbols.h>
#include <soc/usb.h>
-#include <stdlib.h>
#include "board.h"
#include "pwm_regulator.h"
@@ -70,11 +60,9 @@ static void prepare_usb(void)
reset_usb_otg1();
}
-void main(void)
+void platform_romstage_main(void)
{
- console_init();
tsadc_init(TSHUT_POL_HIGH);
- exception_init();
/* Init DVS to conservative values. */
init_dvs_outputs();
@@ -87,6 +75,4 @@ void main(void)
mmu_config_range((void *)0, (uintptr_t)sdram_size_mb() * MiB,
CACHED_MEM);
mmu_config_range(_dma_coherent, _dma_coherent_size, UNCACHED_MEM);
- cbmem_initialize_empty();
- run_ramstage();
}
diff --git a/src/mainboard/google/kukui/romstage.c b/src/mainboard/google/kukui/romstage.c
index 342a0ba3d2..9eeaa68e09 100644
--- a/src/mainboard/google/kukui/romstage.c
+++ b/src/mainboard/google/kukui/romstage.c
@@ -13,21 +13,10 @@
* GNU General Public License for more details.
*/
-#include <arch/exception.h>
-#include <console/console.h>
-#include <program_loading.h>
+#include <arch/stages.h>
#include <soc/mmu_operations.h>
-#include <timestamp.h>
-void main(void)
+void platform_romstage_main(void)
{
- timestamp_add_now(TS_START_ROMSTAGE);
-
- /* Init UART baudrate when PLL on. */
- console_init();
- exception_init();
-
mtk_mmu_after_dram();
-
- run_ramstage();
}
diff --git a/src/mainboard/google/oak/romstage.c b/src/mainboard/google/oak/romstage.c
index 9f5ce5f2df..754c40ce66 100644
--- a/src/mainboard/google/oak/romstage.c
+++ b/src/mainboard/google/oak/romstage.c
@@ -12,39 +12,21 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <arch/cache.h>
-#include <arch/cpu.h>
-#include <arch/exception.h>
-#include <arch/io.h>
-#include <arch/mmu.h>
-#include <boardid.h>
-#include <cbfs.h>
-#include <cbmem.h>
-#include <console/console.h>
-#include <delay.h>
-#include <program_loading.h>
-#include <romstage_handoff.h>
-#include <symbols.h>
-#include <timer.h>
-#include <timestamp.h>
+#include <arch/stages.h>
+#include <boardid.h>
#include <soc/emi.h>
#include <soc/mmu_operations.h>
#include <soc/mt6391.h>
#include <soc/pll.h>
#include <soc/rtc.h>
+#include <timer.h>
-void main(void)
+void platform_romstage_main(void)
{
int stabilize_usec;
struct stopwatch sw;
- timestamp_add_now(TS_START_ROMSTAGE);
-
- /* init uart baudrate when pll on */
- console_init();
- exception_init();
-
rtc_boot();
/* Raise CPU voltage to allow higher frequency */
@@ -64,9 +46,4 @@ void main(void)
mt_pll_raise_ca53_freq(1700 * MHz);
mtk_mmu_after_dram();
-
- /* should be called after memory init */
- cbmem_initialize_empty();
-
- run_ramstage();
}