summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec/google/chromeec/ec.c')
-rw-r--r--src/ec/google/chromeec/ec.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 75d9da16e2..d2a0849dc9 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -611,10 +611,10 @@ int google_chromeec_cbi_get_oem_id(uint32_t *id)
return cbi_get_uint32(id, CBI_TAG_OEM_ID);
}
-int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize)
+static int cbi_get_string(char *buf, size_t bufsize, uint32_t tag)
{
struct ec_params_get_cbi p = {
- .tag = CBI_TAG_DRAM_PART_NUM,
+ .tag = tag,
};
struct chromeec_command cmd = {
.cmd_code = EC_CMD_GET_CROS_BOARD_INFO,
@@ -636,6 +636,16 @@ int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize)
return 0;
}
+int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize)
+{
+ return cbi_get_string(buf, bufsize, CBI_TAG_DRAM_PART_NUM);
+}
+
+int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize)
+{
+ return cbi_get_string(buf, bufsize, CBI_TAG_OEM_NAME);
+}
+
int google_chromeec_get_board_version(uint32_t *version)
{
struct chromeec_command cmd;