summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/volteer/variants/baseboard
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2020-08-05 14:50:40 -0700
committerNick Vaccaro <nvaccaro@google.com>2020-08-06 17:42:31 +0000
commitce25b947e0dbecf38b51789b5a54e09fe5f77a78 (patch)
tree7758acec1ea3f9d29260d417030791f8a702306b /src/mainboard/google/volteer/variants/baseboard
parent0cc63ccaa26c21d02025f3b1c31f2fc4e8adc697 (diff)
downloadcoreboot-ce25b947e0dbecf38b51789b5a54e09fe5f77a78.tar.gz
coreboot-ce25b947e0dbecf38b51789b5a54e09fe5f77a78.tar.bz2
coreboot-ce25b947e0dbecf38b51789b5a54e09fe5f77a78.zip
mb/google/volteer: add support for ddr4 memory
Add new ddr_memory_cfg structure to support both DDR4 and LPDDR4x memory types. Change existing variant code to use the new meminit_ddr() call instead of calling meminit_lpddr4x() directly. BUG=b:161772961 TEST='emerge-volteer coreboot chromeos-bootimage' and verify that volteer still boots. NOTE that this only tests the lpddr4 side of the implementation as I do not have a DDR4 board to test this on. Change-Id: Id4bca2bfa97530f0d04a0e8d90f01b8281d2aea6 Signed-off-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44250 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Caveh Jalali <caveh@chromium.org>
Diffstat (limited to 'src/mainboard/google/volteer/variants/baseboard')
-rw-r--r--src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/google/volteer/variants/baseboard/memory.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
index 2f90a42e7108..84081983c3a9 100644
--- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h
@@ -18,7 +18,7 @@ const struct pad_config *variant_override_gpio_table(size_t *num);
const struct cros_gpio *variant_cros_gpios(size_t *num);
-const struct lpddr4x_cfg *variant_memory_params(void);
+const struct ddr_memory_cfg *variant_memory_params(void);
int variant_memory_sku(void);
#endif /* __BASEBOARD_VARIANTS_H__ */
diff --git a/src/mainboard/google/volteer/variants/baseboard/memory.c b/src/mainboard/google/volteer/variants/baseboard/memory.c
index 2da395aa0985..dafeb3b3a60f 100644
--- a/src/mainboard/google/volteer/variants/baseboard/memory.c
+++ b/src/mainboard/google/volteer/variants/baseboard/memory.c
@@ -4,7 +4,7 @@
#include <baseboard/variants.h>
#include <gpio.h>
-static const struct lpddr4x_cfg baseboard_memcfg = {
+static const struct lpddr4x_cfg baseboard_lpddr4x_memcfg = {
/* DQ CPU<>DRAM map */
.dq_map = {
[0] = {
@@ -56,7 +56,12 @@ static const struct lpddr4x_cfg baseboard_memcfg = {
.ect = 1, /* Enable Early Command Training */
};
-const struct lpddr4x_cfg *__weak variant_memory_params(void)
+static const struct ddr_memory_cfg baseboard_memcfg = {
+ .mem_type = MEMTYPE_LPDDR4X,
+ .lpddr4_cfg = &baseboard_lpddr4x_memcfg
+};
+
+const struct ddr_memory_cfg *__weak variant_memory_params(void)
{
return &baseboard_memcfg;
}