mb/*: Update SPD mapping for sandybridge boards

Boards without HAVE_SPD_IN_CBFS: Move SPD mapping into devicetree.

Boards with HAVE_SPD_IN_CBFS: Convert to Haswell-style SPD mapping.

Change-Id: Id6ac0a36b2fc0b9686f6e875dd020ae8dba72a72
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
diff --git a/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c
index 65a1819..2799a85 100644
--- a/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/revolve_810_g1/early_init.c
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
 #include <bootblock_common.h>
-#include <string.h>
-#include <cbfs.h>
-#include <console/console.h>
-#include <northbridge/intel/sandybridge/raminit_native.h>
+#include <northbridge/intel/sandybridge/raminit.h>
 #include <southbridge/intel/bd82x6x/pch.h>
 #include <ec/hp/kbc1126/ec.h>
 
@@ -35,15 +32,10 @@
 	kbc1126_exit_conf();
 }
 
-void mainboard_get_spd(spd_raw_data *spd, bool id_only)
+void mb_get_spd_map(struct spd_info *spdi)
 {
+	spdi->addresses[0] = 0x50;
 	/* C1S0 is a soldered RAM with no real SPD. Use stored SPD.  */
-	size_t spd_file_len = 0;
-	void *spd_file = cbfs_map("spd.bin", &spd_file_len);
-
-	if (!spd_file || spd_file_len < sizeof(spd_raw_data))
-		die("SPD data for C1S0 not found.");
-
-	read_spd(&spd[0], 0x50, id_only);
-	memcpy(&spd[2], spd_file, spd_file_len);
+	spdi->addresses[2] = SPD_MEMORY_DOWN;
+	spdi->spd_index = 0;
 }