aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/cyan/romstage.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2019-05-04 17:06:06 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-05-07 15:58:05 +0000
commit85f0b051ba441dead63a4a14f4f20d49581fea0e (patch)
treede0e33d755daf681eee01a1f45c72fc9a61c56f4 /src/mainboard/google/cyan/romstage.c
parentec562161cd2265c924482835fd2ab32c13ba587e (diff)
mb/google/cyan: Refactor to get rid of `pei_data`
The SoC specific `struct pei_data` was filled with values that were later only consumed by the mainboard code again. Avoid jumping through this hoop and fill FSP UPDs directly. The provided solution locates the SPD data in CBFS again to fill SMBIOS tables. This is not perfect. OTOH, this code isn't mainboard specific and doesn't belong here anyway. Change-Id: Ib6103d5b9550846fe17c926631a013ff80b9598f Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32593 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/mainboard/google/cyan/romstage.c')
-rw-r--r--src/mainboard/google/cyan/romstage.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mainboard/google/cyan/romstage.c b/src/mainboard/google/cyan/romstage.c
index 5470b9c465..c877e42055 100644
--- a/src/mainboard/google/cyan/romstage.c
+++ b/src/mainboard/google/cyan/romstage.c
@@ -17,13 +17,11 @@
#include <soc/romstage.h>
#include <baseboard/variants.h>
+#include "spd/spd_util.h"
+
/* All FSP specific code goes in this block */
void mainboard_romstage_entry(struct romstage_params *rp)
{
- struct pei_data *ps = rp->pei_data;
-
- mainboard_fill_spd_data(ps);
-
/* Call back into chipset code with platform values updated. */
romstage_common(rp);
}
@@ -31,16 +29,7 @@ void mainboard_romstage_entry(struct romstage_params *rp)
void mainboard_memory_init_params(struct romstage_params *params,
MEMORY_INIT_UPD *memory_params)
{
- /* Update SPD data */
- if (CONFIG(BOARD_GOOGLE_CYAN)) {
- memory_params->PcdMemoryTypeEnable = MEM_DDR3;
- memory_params->PcdMemorySpdPtr =
- (u32)params->pei_data->spd_data_ch0;
- } else
- memory_params->PcdMemoryTypeEnable = MEM_LPDDR3;
-
- memory_params->PcdMemChannel0Config = params->pei_data->spd_ch0_config;
- memory_params->PcdMemChannel1Config = params->pei_data->spd_ch1_config;
+ spd_memory_init_params(memory_params);
/* Variant-specific memory params */
variant_memory_init_params(memory_params);