mb/google/volteer/elemi: Add memory.c for DDR4
Add new memory.c to support DDR4 memory types. BUG=b:170604353 TEST=emerge-volteer coreboot chromeos-bootimage Change-Id: If96b0bda0ce95766f0957c37aa7cbecefc9c03e0 Signed-off-by: Wisley Chen <wisley.chen@quantatw.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46378 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
This commit is contained in:
parent
42aa2cb94a
commit
f580d9ffef
2 changed files with 34 additions and 0 deletions
3
src/mainboard/google/volteer/variants/elemi/Makefile.inc
Normal file
3
src/mainboard/google/volteer/variants/elemi/Makefile.inc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
romstage-y += memory.c
|
31
src/mainboard/google/volteer/variants/elemi/memory.c
Normal file
31
src/mainboard/google/volteer/variants/elemi/memory.c
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <baseboard/gpio.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <gpio.h>
|
||||||
|
|
||||||
|
/*This mb_ddr4_cfg structure is intentionally left empty so that fields are left nil. */
|
||||||
|
static const struct mb_ddr4_cfg elemi_memcfg = {
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct ddr_memory_cfg baseboard_memcfg = {
|
||||||
|
.mem_type = MEMTYPE_DDR4,
|
||||||
|
.ddr4_cfg = &elemi_memcfg
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct ddr_memory_cfg *variant_memory_params(void)
|
||||||
|
{
|
||||||
|
return &baseboard_memcfg;
|
||||||
|
}
|
||||||
|
|
||||||
|
int variant_memory_sku(void)
|
||||||
|
{
|
||||||
|
gpio_t spd_gpios[] = {
|
||||||
|
GPIO_MEM_CONFIG_3,
|
||||||
|
GPIO_MEM_CONFIG_2,
|
||||||
|
GPIO_MEM_CONFIG_1,
|
||||||
|
GPIO_MEM_CONFIG_0,
|
||||||
|
};
|
||||||
|
|
||||||
|
return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
|
||||||
|
}
|
Loading…
Reference in a new issue