summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/dedede/romstage.c8
-rw-r--r--src/mainboard/google/hatch/romstage_spd_cbfs.c7
-rw-r--r--src/mainboard/google/volteer/romstage.c8
3 files changed, 9 insertions, 14 deletions
diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c
index 8028db0e6a..e143f700cd 100644
--- a/src/mainboard/google/dedede/romstage.c
+++ b/src/mainboard/google/dedede/romstage.c
@@ -22,17 +22,15 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated);
}
-bool 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];
if (google_chromeec_cbi_get_dram_part_num(&part_num_store[0],
sizeof(part_num_store)) < 0) {
printk(BIOS_ERR, "No DRAM part number in CBI!\n");
- return false;
+ return NULL;
}
- *part_num = &part_num_store[0];
- *len = strlen(part_num_store);
- return true;
+ return part_num_store;
}
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;
}
diff --git a/src/mainboard/google/volteer/romstage.c b/src/mainboard/google/volteer/romstage.c
index 552648bfe3..51a4ebc75d 100644
--- a/src/mainboard/google/volteer/romstage.c
+++ b/src/mainboard/google/volteer/romstage.c
@@ -29,16 +29,14 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
meminit_ddr(mem_cfg, board_cfg, &spd_info, half_populated);
}
-bool 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];
if (google_chromeec_cbi_get_dram_part_num(part_num_store,
sizeof(part_num_store)) < 0) {
printk(BIOS_ERR, "ERROR: Couldn't obtain DRAM part number from CBI\n");
- return false;
+ return NULL;
}
- *part_num = part_num_store;
- *len = strlen(part_num_store);
- return true;
+ return part_num_store;
}