summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-12 16:17:26 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-18 07:06:13 +0000
commitdc2e7c6e0fb1331a7808c226992c71e07f9ca7bd (patch)
treef1bde11a320b587f99bc3a62e654ab1be346ea24 /src/northbridge
parent05d7d82d37ae04ec4cf3579eb1c0f7bf0c0b7aa2 (diff)
downloadcoreboot-dc2e7c6e0fb1331a7808c226992c71e07f9ca7bd.tar.xz
nb/intel/sandybridge: Make the mainboard_early_init hook optional
This adds an empty weakly linked default. The rationale behind this change is that without the callback some features might not work but that the result is likely still able to boot, so it can be made optional. Change-Id: I62c8010aa81fc45d208e9293feb2f45b45f34a82 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36780 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/sandybridge/romstage.c4
-rw-r--r--src/northbridge/intel/sandybridge/sandybridge.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/northbridge/intel/sandybridge/romstage.c b/src/northbridge/intel/sandybridge/romstage.c
index 55f2928213..92882b4b61 100644
--- a/src/northbridge/intel/sandybridge/romstage.c
+++ b/src/northbridge/intel/sandybridge/romstage.c
@@ -30,6 +30,10 @@
#include <southbridge/intel/common/pmclib.h>
#include <elog.h>
+__weak void mainboard_early_init(int s3_resume)
+{
+}
+
static void early_pch_reset_pmcon(void)
{
u8 reg8;
diff --git a/src/northbridge/intel/sandybridge/sandybridge.h b/src/northbridge/intel/sandybridge/sandybridge.h
index 31d4358e7b..d667e36571 100644
--- a/src/northbridge/intel/sandybridge/sandybridge.h
+++ b/src/northbridge/intel/sandybridge/sandybridge.h
@@ -213,6 +213,8 @@ void northbridge_romstage_finalize(int s3resume);
void early_init_dmi(void);
void pch_enable_lpc(void);
+/* mainboard_early_init: Optional mainboard callback run after console init
+ but before raminit. */
void mainboard_early_init(int s3resume);
void mainboard_config_superio(void);
int mainboard_should_reset_usb(int s3resume);