From 03c858fb231734824f9036aa52086fd067c98d04 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 4 Jan 2024 17:31:06 +0100 Subject: soc/amd/common/emmc: add Kconfig option to skip powering off eMMC Add a Kconfig option to skip powering off the eMMC controller via the AOAC block in the case where the eMMC controller is disabled in the devicetree. Signed-off-by: Felix Held Change-Id: I0dbe819222972d9bf0789671b031ad83648e8917 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79825 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/emmc/Kconfig | 7 +++++++ src/soc/amd/common/block/emmc/emmc.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/block/emmc/Kconfig b/src/soc/amd/common/block/emmc/Kconfig index 96bbada13b..6316841a51 100644 --- a/src/soc/amd/common/block/emmc/Kconfig +++ b/src/soc/amd/common/block/emmc/Kconfig @@ -2,3 +2,10 @@ config SOC_AMD_COMMON_BLOCK_EMMC bool help Select this option to use AMD common EMMC driver support. + +config SOC_AMD_COMMON_BLOCK_EMMC_SKIP_POWEROFF + bool + depends on SOC_AMD_COMMON_BLOCK_EMMC + help + Select this option to try to switch off the power of the eMMC + controller via the AOAC registers. diff --git a/src/soc/amd/common/block/emmc/emmc.c b/src/soc/amd/common/block/emmc/emmc.c index 09d235076c..9242d71551 100644 --- a/src/soc/amd/common/block/emmc/emmc.c +++ b/src/soc/amd/common/block/emmc/emmc.c @@ -12,7 +12,7 @@ static void emmc_read_resources(struct device *dev) static void emmc_enable(struct device *dev) { - if (!dev->enabled) + if (!dev->enabled && !CONFIG(SOC_AMD_COMMON_BLOCK_EMMC_SKIP_POWEROFF)) power_off_aoac_device(FCH_AOAC_DEV_EMMC); } -- cgit v1.2.3