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 <felix-coreboot@felixheld.de>
Change-Id: I0dbe819222972d9bf0789671b031ad83648e8917
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79825
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2024-01-04 17:31:06 +01:00
parent ddc19b3341
commit 03c858fb23
2 changed files with 8 additions and 1 deletions

View File

@ -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.

View File

@ -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);
}