soc/intel/alderlake: Disable UFS controllers only on S5 resume

Disable UFS controllers during romstage initialization only when
resuming from S5 (full power off).

On warm reboot, the UFS controllers are already disabled by the
previous boot cycle, so disabling them again is unnecessary.

TEST=Able to ensure UFS controller is already disabled in warm reboot
path and not causing any problem during S0ix cycle test.

Change-Id: Ia27d2156a002cef032d5f57d212cf4eb520b3bdf
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jayvik Desai <jayvik@google.com>
This commit is contained in:
Subrata Banik 2024-11-03 12:12:43 +05:30
commit 5e580c79df

View file

@ -188,9 +188,9 @@ void mainboard_romstage_entry(void)
/* Program to Disable UFS Controllers */
if (!is_devfn_enabled(PCH_DEVFN_UFS) &&
(CONFIG(USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS))) {
printk(BIOS_INFO, "Disabling UFS controllers\n");
disable_ufs();
if (ps->prev_sleep_state == ACPI_S5 && !mainboard_expects_another_reset()) {
printk(BIOS_INFO, "Disabling UFS controllers\n");
disable_ufs();
printk(BIOS_INFO, "Warm Reset after disabling UFS controllers\n");
system_reset();
}