amdfwtool: Call the set_efs_table for Stoneyridge
Related to https://review.coreboot.org/c/coreboot/+/58555 commit-id: 35b7e0a2d82ac In 58555, we added the SOC ID for Stoneyridge in amdfwtool command line. But it raised building error because it then called "set_efs_table" without setting SPI mode. So we skipped calling that. But in set_efs_table, it has case for Stoneyridge. The boards also need to have this setting. So we remove the skipping and give the proper SPI mode in mainboard Kconfig. Change-Id: I24499ff6daf7878b12b6044496f53379116c598f Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58871 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
6e2c5a3d18
commit
570645dc2a
|
@ -34,4 +34,12 @@ config STONEYRIDGE_LEGACY_FREE
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
if !EM100
|
||||||
|
config EFS_SPI_READ_MODE
|
||||||
|
default 4 # Dual IO (1-2-2)
|
||||||
|
|
||||||
|
config EFS_SPI_SPEED
|
||||||
|
default 0 # 66MHz
|
||||||
|
endif
|
||||||
|
|
||||||
endif # BOARD_AMD_GARDENIA
|
endif # BOARD_AMD_GARDENIA
|
||||||
|
|
|
@ -58,4 +58,12 @@ config HWM_PORT
|
||||||
If changed, make sure fan_init.c IO window setting. The HWM
|
If changed, make sure fan_init.c IO window setting. The HWM
|
||||||
(Hardware Monitor) is used for fan control within padmelon.
|
(Hardware Monitor) is used for fan control within padmelon.
|
||||||
|
|
||||||
|
if !EM100
|
||||||
|
config EFS_SPI_READ_MODE
|
||||||
|
default 4 # Dual IO (1-2-2)
|
||||||
|
|
||||||
|
config EFS_SPI_SPEED
|
||||||
|
default 0 # 66MHz
|
||||||
|
endif
|
||||||
|
|
||||||
endif # BOARD_AMD_PADMELON
|
endif # BOARD_AMD_PADMELON
|
||||||
|
|
|
@ -123,6 +123,14 @@ config OEM_BIN_FILE
|
||||||
depends on USE_OEM_BIN
|
depends on USE_OEM_BIN
|
||||||
default ""
|
default ""
|
||||||
|
|
||||||
|
if !EM100
|
||||||
|
config EFS_SPI_READ_MODE
|
||||||
|
default 4 # Dual IO (1-2-2)
|
||||||
|
|
||||||
|
config EFS_SPI_SPEED
|
||||||
|
default 0 # 66MHz
|
||||||
|
endif
|
||||||
|
|
||||||
# Don't use AMD's Secure OS
|
# Don't use AMD's Secure OS
|
||||||
config USE_PSPSECUREOS
|
config USE_PSPSECUREOS
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
|
@ -132,6 +132,9 @@ endif
|
||||||
|
|
||||||
OPT_PSP_USE_PSPSECUREOS=$(call strip_quotes, $(PSP_USE_PSPSECUREOS))
|
OPT_PSP_USE_PSPSECUREOS=$(call strip_quotes, $(PSP_USE_PSPSECUREOS))
|
||||||
|
|
||||||
|
OPT_EFS_SPI_READ_MODE=$(call add_opt_prefix, $(CONFIG_EFS_SPI_READ_MODE), --spi-read-mode)
|
||||||
|
OPT_EFS_SPI_SPEED=$(call add_opt_prefix, $(CONFIG_EFS_SPI_SPEED), --spi-speed)
|
||||||
|
|
||||||
# Add all the files listed in the config file
|
# Add all the files listed in the config file
|
||||||
POUND_SIGN=$(call strip_quotes, "\#")
|
POUND_SIGN=$(call strip_quotes, "\#")
|
||||||
DEP_FILES= $(patsubst %,$(FIRMWARE_LOCATION)/%, $(shell sed -e /^$(POUND_SIGN)/d -e /^FIRMWARE_LOCATION/d $(CONFIG_AMDFW_CONFIG_FILE) | awk '{print $$2}' ))
|
DEP_FILES= $(patsubst %,$(FIRMWARE_LOCATION)/%, $(shell sed -e /^$(POUND_SIGN)/d -e /^FIRMWARE_LOCATION/d $(CONFIG_AMDFW_CONFIG_FILE) | awk '{print $$2}' ))
|
||||||
|
@ -147,6 +150,8 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(CONFIG_STONEYRIDGE_XHCI_FWM_FILE)) \
|
||||||
$(OPT_STONEYRIDGE_GEC_FWM_FILE) \
|
$(OPT_STONEYRIDGE_GEC_FWM_FILE) \
|
||||||
$(OPT_COMBOCAPABLE)\
|
$(OPT_COMBOCAPABLE)\
|
||||||
$(OPT_PSP_USE_PSPSECUREOS) \
|
$(OPT_PSP_USE_PSPSECUREOS) \
|
||||||
|
$(OPT_EFS_SPI_READ_MODE) \
|
||||||
|
$(OPT_EFS_SPI_SPEED) \
|
||||||
--config $(CONFIG_AMDFW_CONFIG_FILE) \
|
--config $(CONFIG_AMDFW_CONFIG_FILE) \
|
||||||
$(OPT_SOCNAME) \
|
$(OPT_SOCNAME) \
|
||||||
--flashsize $(CONFIG_ROM_SIZE) \
|
--flashsize $(CONFIG_ROM_SIZE) \
|
||||||
|
|
|
@ -1586,14 +1586,12 @@ int main(int argc, char **argv)
|
||||||
amd_romsig->xhci_entry = 0;
|
amd_romsig->xhci_entry = 0;
|
||||||
|
|
||||||
if (soc_id != PLATFORM_UNKNOWN) {
|
if (soc_id != PLATFORM_UNKNOWN) {
|
||||||
if (soc_id != PLATFORM_STONEYRIDGE) {
|
|
||||||
retval = set_efs_table(soc_id, amd_romsig, efs_spi_readmode,
|
retval = set_efs_table(soc_id, amd_romsig, efs_spi_readmode,
|
||||||
efs_spi_speed, efs_spi_micron_flag);
|
efs_spi_speed, efs_spi_micron_flag);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
fprintf(stderr, "ERROR: Failed to initialize EFS table!\n");
|
fprintf(stderr, "ERROR: Failed to initialize EFS table!\n");
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "WARNING: No SOC name specified.\n");
|
fprintf(stderr, "WARNING: No SOC name specified.\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue