Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79825?usp=email )
Change subject: soc/amd/common/emmc: add Kconfig option to skip powering off eMMC ......................................................................
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 --- M src/soc/amd/common/block/emmc/Kconfig M src/soc/amd/common/block/emmc/emmc.c 2 files changed, 8 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Matt DeVillier: Looks good to me, approved
diff --git a/src/soc/amd/common/block/emmc/Kconfig b/src/soc/amd/common/block/emmc/Kconfig index 96bbada..6316841 100644 --- a/src/soc/amd/common/block/emmc/Kconfig +++ b/src/soc/amd/common/block/emmc/Kconfig @@ -2,3 +2,10 @@ 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 09d2350..9242d71 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_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); }