From 850b6c6254ab34cdbda24818cb0ecca484c01c86 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 7 Sep 2023 16:33:26 +0200 Subject: soc/amd/picasso: add eMMC MMIO device to devicetree Add the eMMC MMIO device to the devicetree and make it use the common AMD eMMC driver. Since there is now a device for this in the devicetree, also use this device to determine if the FSP should be told if the eMMC controller is supposed to be disabled. TEST=On Mandolin the eMMC controller both disappears in the Windows 10 device manager and in dmesg on Ubuntu 2022.04 LTS TEST=Morphius with NVMe SSD still works Signed-off-by: Felix Held Change-Id: I5453b69df776d2ce1f3be11e37cd26c8c64f0cd5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77990 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb | 2 ++ src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb | 2 ++ src/mainboard/google/zork/variants/berknip/variant.c | 6 +----- src/mainboard/google/zork/variants/dalboz/variant.c | 2 +- src/mainboard/google/zork/variants/ezkinil/variant.c | 6 +----- src/mainboard/google/zork/variants/morphius/variant.c | 6 +----- 6 files changed, 8 insertions(+), 16 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb b/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb index ac4bdcf6d8..bff91fcf99 100644 --- a/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb @@ -388,4 +388,6 @@ chip soc/amd/picasso device ref uart_0 on end # console + device ref emmc on end + end # chip soc/amd/picasso diff --git a/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb b/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb index 572427e5f8..448982a311 100644 --- a/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb @@ -436,4 +436,6 @@ chip soc/amd/picasso device ref uart_0 on end # console + device ref emmc on end + end # chip soc/amd/picasso diff --git a/src/mainboard/google/zork/variants/berknip/variant.c b/src/mainboard/google/zork/variants/berknip/variant.c index 092ff260b3..1810a666bf 100644 --- a/src/mainboard/google/zork/variants/berknip/variant.c +++ b/src/mainboard/google/zork/variants/berknip/variant.c @@ -4,13 +4,9 @@ void variant_devtree_update(void) { - struct soc_amd_picasso_config *cfg; - - cfg = config_of_soc(); - /* * Enable eMMC if eMMC bit is set in FW_CONFIG or device is unprovisioned. */ if (!(variant_has_emmc() || boot_is_factory_unprovisioned())) - cfg->emmc_config.timing = SD_EMMC_DISABLE; + DEV_PTR(emmc)->enabled = 0; } diff --git a/src/mainboard/google/zork/variants/dalboz/variant.c b/src/mainboard/google/zork/variants/dalboz/variant.c index 6bf8678404..6260cfc02e 100644 --- a/src/mainboard/google/zork/variants/dalboz/variant.c +++ b/src/mainboard/google/zork/variants/dalboz/variant.c @@ -59,7 +59,7 @@ void variant_devtree_update(void) cfg->emmc_config.timing = SD_EMMC_EMMC_HS200; } } else { - cfg->emmc_config.timing = SD_EMMC_DISABLE; + DEV_PTR(emmc)->enabled = 0; } update_audio_configuration(); diff --git a/src/mainboard/google/zork/variants/ezkinil/variant.c b/src/mainboard/google/zork/variants/ezkinil/variant.c index f76ab62035..142aa21bd8 100644 --- a/src/mainboard/google/zork/variants/ezkinil/variant.c +++ b/src/mainboard/google/zork/variants/ezkinil/variant.c @@ -7,13 +7,9 @@ void variant_devtree_update(void) { - struct soc_amd_picasso_config *cfg; - - cfg = config_of_soc(); - /* * Enable eMMC if eMMC bit is set in FW_CONFIG or device is unprovisioned. */ if (!(variant_has_emmc() || boot_is_factory_unprovisioned())) - cfg->emmc_config.timing = SD_EMMC_DISABLE; + DEV_PTR(emmc)->enabled = 0; } diff --git a/src/mainboard/google/zork/variants/morphius/variant.c b/src/mainboard/google/zork/variants/morphius/variant.c index 092ff260b3..1810a666bf 100644 --- a/src/mainboard/google/zork/variants/morphius/variant.c +++ b/src/mainboard/google/zork/variants/morphius/variant.c @@ -4,13 +4,9 @@ void variant_devtree_update(void) { - struct soc_amd_picasso_config *cfg; - - cfg = config_of_soc(); - /* * Enable eMMC if eMMC bit is set in FW_CONFIG or device is unprovisioned. */ if (!(variant_has_emmc() || boot_is_factory_unprovisioned())) - cfg->emmc_config.timing = SD_EMMC_DISABLE; + DEV_PTR(emmc)->enabled = 0; } -- cgit v1.2.3