summaryrefslogtreecommitdiff
path: root/src/mainboard/google/hatch
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2020-09-30 09:49:05 -0700
committerNick Vaccaro <nvaccaro@google.com>2020-10-05 18:02:22 +0000
commit0ed02d00cb129f2aa3959116e1730d4d14da2a60 (patch)
treebea8ca85a8e432f6249fad848ee9cf498446035b /src/mainboard/google/hatch
parentaef9ac97c7b84a5ca51d97d63c4134ffb1da6615 (diff)
mb, soc: change mainboard_get_dram_part_num() prototype
Change mainboard_get_dram_part_num() to return a constant character pointer to a null-terminated C string and to take no input parameters. This also addresses the issue that different SOCs and motherboards were using different definitions for mainboard_get_dram_part_num by consolidating to a single definition. BUG=b:169774661, b:168724473 TEST="emerge-volteer coreboot && emerge-dedede coreboot && emerge-hatch coreboot" and verify build completes successfully. Change-Id: Ie7664eab65a2b9e25b7853bf68baf2525b040487 Signed-off-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45873 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/hatch')
-rw-r--r--src/mainboard/google/hatch/romstage_spd_cbfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mainboard/google/hatch/romstage_spd_cbfs.c b/src/mainboard/google/hatch/romstage_spd_cbfs.c
index a9a65e90af..b8937de91b 100644
--- a/src/mainboard/google/hatch/romstage_spd_cbfs.c
+++ b/src/mainboard/google/hatch/romstage_spd_cbfs.c
@@ -57,7 +57,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}
-void mainboard_get_dram_part_num(const char **part_num, size_t *len)
+const char *mainboard_get_dram_part_num(void)
{
static char part_num_store[DIMM_INFO_PART_NUMBER_SIZE];
static enum {
@@ -77,8 +77,7 @@ void mainboard_get_dram_part_num(const char **part_num, size_t *len)
}
if (part_num_state == PART_NUM_NOT_IN_CBI)
- return;
+ return NULL;
- *part_num = &part_num_store[0];
- *len = strlen(part_num_store) + 1;
+ return part_num_store;
}