summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/variants/kano/memory.c11
-rw-r--r--src/mainboard/google/brya/variants/osiris/memory.c11
-rw-r--r--src/mainboard/google/brya/variants/taeko/memory.c11
3 files changed, 18 insertions, 15 deletions
diff --git a/src/mainboard/google/brya/variants/kano/memory.c b/src/mainboard/google/brya/variants/kano/memory.c
index 416fb073cf..c81f8cc21f 100644
--- a/src/mainboard/google/brya/variants/kano/memory.c
+++ b/src/mainboard/google/brya/variants/kano/memory.c
@@ -136,10 +136,11 @@ const struct mb_cfg *variant_memory_params(void)
const char *hynix_mem1 = "H54G46CYRBX267";
const char *hynix_mem2 = "H54G56CYRBX247";
- if (!strcmp(part_num, hynix_mem1) || !strcmp(part_num, hynix_mem2)) {
- printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix memory\n");
- return &hynix_memcfg;
- } else {
- return &kano_memcfg;
+ if (part_num) {
+ if (!strcmp(part_num, hynix_mem1) || !strcmp(part_num, hynix_mem2)) {
+ printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix memory\n");
+ return &hynix_memcfg;
+ }
}
+ return &kano_memcfg;
}
diff --git a/src/mainboard/google/brya/variants/osiris/memory.c b/src/mainboard/google/brya/variants/osiris/memory.c
index 564289875f..4d16379174 100644
--- a/src/mainboard/google/brya/variants/osiris/memory.c
+++ b/src/mainboard/google/brya/variants/osiris/memory.c
@@ -136,10 +136,11 @@ const struct mb_cfg *variant_memory_params(void)
const char *hynix_mem1 = "H54G46CYRBX267";
const char *hynix_mem2 = "H54G56CYRBX247";
- if (!strcmp(part_num, hynix_mem1) || !strcmp(part_num, hynix_mem2)) {
- printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix memory\n");
- return &hynix_memcfg;
- } else {
- return &osiris_memcfg;
+ if (part_num) {
+ if (!strcmp(part_num, hynix_mem1) || !strcmp(part_num, hynix_mem2)) {
+ printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix memory\n");
+ return &hynix_memcfg;
+ }
}
+ return &osiris_memcfg;
}
diff --git a/src/mainboard/google/brya/variants/taeko/memory.c b/src/mainboard/google/brya/variants/taeko/memory.c
index 72a6be2964..cecfdc6222 100644
--- a/src/mainboard/google/brya/variants/taeko/memory.c
+++ b/src/mainboard/google/brya/variants/taeko/memory.c
@@ -135,12 +135,13 @@ static const struct mb_cfg hynix_memconfig = {
const struct mb_cfg *variant_memory_params(void)
{
const char *dram_part_num = mainboard_get_dram_part_num();
- if (strcmp(dram_part_num, "H54G46CYRBX267N") == 0) {
- printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix DRAM part\n");
- return &hynix_memconfig;
- } else {
- return &baseboard_memcfg;
+ if (dram_part_num) {
+ if (strcmp(dram_part_num, "H54G46CYRBX267N") == 0) {
+ printk(BIOS_INFO, "Enable cs_pi_start_high_in_ect for Hynix DRAM part\n");
+ return &hynix_memconfig;
+ }
}
+ return &baseboard_memcfg;
}
int variant_memory_sku(void)