From 5e580c79dfd43387e6d375c94c6d95c520189111 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 3 Nov 2024 12:12:43 +0530 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84974 Tested-by: build bot (Jenkins) Reviewed-by: Jayvik Desai --- src/soc/intel/alderlake/romstage/romstage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/alderlake/romstage/romstage.c b/src/soc/intel/alderlake/romstage/romstage.c index 2f50cd29dd..3acd2fd7c3 100644 --- a/src/soc/intel/alderlake/romstage/romstage.c +++ b/src/soc/intel/alderlake/romstage/romstage.c @@ -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(); } -- cgit v1.2.3