summaryrefslogtreecommitdiff
path: root/src/mainboard/google/eve/spd
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/eve/spd')
-rw-r--r--src/mainboard/google/eve/spd/spd.c16
-rw-r--r--src/mainboard/google/eve/spd/spd.h1
2 files changed, 11 insertions, 6 deletions
diff --git a/src/mainboard/google/eve/spd/spd.c b/src/mainboard/google/eve/spd/spd.c
index bac510729e..2f365a7b5c 100644
--- a/src/mainboard/google/eve/spd/spd.c
+++ b/src/mainboard/google/eve/spd/spd.c
@@ -77,20 +77,24 @@ static void mainboard_print_spd_info(uint8_t spd[])
}
}
-uintptr_t mainboard_get_spd_data(void)
+int mainboard_get_spd_index(void)
{
- char *spd_file;
- size_t spd_file_len;
- int spd_index;
-
gpio_t spd_gpios[] = {
GPIO_MEM_CONFIG_0,
GPIO_MEM_CONFIG_1,
GPIO_MEM_CONFIG_2,
GPIO_MEM_CONFIG_3,
};
+ return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
+}
+
+uintptr_t mainboard_get_spd_data(void)
+{
+ char *spd_file;
+ size_t spd_file_len;
+ int spd_index;
- spd_index = gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
+ spd_index = mainboard_get_spd_index();
printk(BIOS_INFO, "SPD index %d\n", spd_index);
/* Load SPD data from CBFS */
diff --git a/src/mainboard/google/eve/spd/spd.h b/src/mainboard/google/eve/spd/spd.h
index 9c2b26bb12..6d8d0a615c 100644
--- a/src/mainboard/google/eve/spd/spd.h
+++ b/src/mainboard/google/eve/spd/spd.h
@@ -30,6 +30,7 @@
#define SPD_PART_LEN 18
#define SPD_MANU_OFF 148
+int mainboard_get_spd_index(void);
uintptr_t mainboard_get_spd_data(void);
#endif