mb/google/octopus/variants/phaser: Implement variant_memory_sku()
This change override memory ID 3 to 1 to workaround the incorrect memory straps in hardware. We would use board_id 7 to identify the specific boards which need to correct the memory ID. BUG=b:259301885 BRANCH=Octopus TEST=Verified on Phaser Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com> Change-Id: I2330b7e16a09f8cc76ed96e81a6165afa80a03a4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70353 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Derek Huang <derekhuang@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Henry Sun <henrysun@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
bd9ab06808
commit
5a724a1adc
|
@ -1,5 +1,7 @@
|
|||
bootblock-y += gpio.c
|
||||
|
||||
romstage-y += memory.c
|
||||
|
||||
ramstage-y += variant.c
|
||||
ramstage-y += gpio.c
|
||||
ramstage-y += mainboard.c
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <baseboard/variants.h>
|
||||
#include <boardid.h>
|
||||
#include <gpio.h>
|
||||
#include <variant/gpio.h>
|
||||
|
||||
size_t variant_memory_sku(void)
|
||||
{
|
||||
size_t rt;
|
||||
gpio_t pads[] = {
|
||||
[3] = MEM_CONFIG3, [2] = MEM_CONFIG2,
|
||||
[1] = MEM_CONFIG1, [0] = MEM_CONFIG0,
|
||||
};
|
||||
|
||||
rt = gpio_base2_value(pads, ARRAY_SIZE(pads));
|
||||
|
||||
if (board_id() == 7)
|
||||
return (rt == 3) ? 1 : rt; // If RAM ID = 3, return 1
|
||||
else
|
||||
return rt;
|
||||
}
|
Loading…
Reference in New Issue