summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/armv4/bootblock_simple.c5
-rw-r--r--src/arch/arm/armv7/bootblock_simple.c5
-rw-r--r--src/arch/arm/include/bootblock_common.h38
3 files changed, 33 insertions, 15 deletions
diff --git a/src/arch/arm/armv4/bootblock_simple.c b/src/arch/arm/armv4/bootblock_simple.c
index 207279b2f6..15b6bdec9a 100644
--- a/src/arch/arm/armv4/bootblock_simple.c
+++ b/src/arch/arm/armv4/bootblock_simple.c
@@ -26,12 +26,15 @@
#include <console/console.h>
#include <halt.h>
+__attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
+__attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
+
void main(void)
{
const char *stage_name = "fallback/romstage";
void *entry;
- bootblock_cpu_init();
+ bootblock_soc_init();
bootblock_mainboard_init();
if (CONFIG_BOOTBLOCK_CONSOLE) {
diff --git a/src/arch/arm/armv7/bootblock_simple.c b/src/arch/arm/armv7/bootblock_simple.c
index aad63b67f9..2fc000d746 100644
--- a/src/arch/arm/armv7/bootblock_simple.c
+++ b/src/arch/arm/armv7/bootblock_simple.c
@@ -28,12 +28,15 @@
#include <halt.h>
#include <smp/node.h>
+__attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
+__attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
+
void main(void)
{
const char *stage_name = "fallback/romstage";
void *entry;
- bootblock_cpu_init();
+ bootblock_soc_init();
bootblock_mainboard_init();
#if CONFIG_BOOTBLOCK_CONSOLE
diff --git a/src/arch/arm/include/bootblock_common.h b/src/arch/arm/include/bootblock_common.h
index 034a12bc36..413a206177 100644
--- a/src/arch/arm/include/bootblock_common.h
+++ b/src/arch/arm/include/bootblock_common.h
@@ -1,15 +1,27 @@
-#if CONFIG_CPU_HAS_BOOTBLOCK_INIT
-void bootblock_cpu_init(void);
-#else
-static void __attribute__((unused)) bootblock_cpu_init(void)
-{
-}
-#endif
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
-#if CONFIG_MAINBOARD_HAS_BOOTBLOCK_INIT
+#ifndef __ARCH_BOOTBLOCK_COMMON_H
+#define __ARCH_BOOTBLOCK_COMMON_H
+
+/* These are defined as weak no-ops that can be overridden by mainboard/SoC. */
void bootblock_mainboard_init(void);
-#else
-static void __attribute__((unused)) bootblock_mainboard_init(void)
-{
-}
-#endif
+void bootblock_soc_init(void);
+
+#endif /* __ARCH_BOOTBLOCK_COMMON_H */