diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-01-04 17:31:06 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-05 16:51:49 +0000 |
commit | 03c858fb231734824f9036aa52086fd067c98d04 (patch) | |
tree | 158a247aeaac8d137372e4114dcd6a95b2e6df33 /src/soc/amd/common | |
parent | ddc19b334168f51d9c9919ec5aaf073daf7fbb35 (diff) |
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>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/emmc/Kconfig | 7 | ||||
-rw-r--r-- | src/soc/amd/common/block/emmc/emmc.c | 2 |
2 files changed, 8 insertions, 1 deletions
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); } |