summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/haswell/raminit_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/intel/haswell/raminit_shared.c')
-rw-r--r--src/northbridge/intel/haswell/raminit_shared.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/northbridge/intel/haswell/raminit_shared.c b/src/northbridge/intel/haswell/raminit_shared.c
new file mode 100644
index 0000000000..90fe1145cc
--- /dev/null
+++ b/src/northbridge/intel/haswell/raminit_shared.c
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <string.h>
+#include "chip.h"
+#include "raminit.h"
+
+void get_spd_info(struct spd_info *spdi, const struct northbridge_intel_haswell_config *cfg)
+{
+ if (CONFIG(HAVE_SPD_IN_CBFS)) {
+ /* With memory down: from mainboard code */
+ mb_get_spd_map(spdi);
+ } else {
+ /* Without memory down: from devicetree */
+ memcpy(spdi->addresses, cfg->spd_addresses, ARRAY_SIZE(spdi->addresses));
+ }
+}