diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-10-13 20:58:47 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-14 20:18:29 +0000 |
commit | 65d73cc4573a23b4d98e3156cc1c4d0a1b09cb96 (patch) | |
tree | f8567513da4a2532131b94a574b35be89cf42349 /src/soc/amd/mendocino | |
parent | 5e2f1b1e646da2e2333252f1f798dff419df0309 (diff) |
soc/amd: factor out common eMMC code
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If5447f9272183f83bc422520ada93d3cfd96551e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68415
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r-- | src/soc/amd/mendocino/Kconfig | 1 | ||||
-rw-r--r-- | src/soc/amd/mendocino/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/amd/mendocino/chipset_mendocino.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/mendocino/chipset_rembrandt.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/mendocino/emmc.c | 23 |
5 files changed, 3 insertions, 26 deletions
diff --git a/src/soc/amd/mendocino/Kconfig b/src/soc/amd/mendocino/Kconfig index 9608e41ec4..d31b29dd43 100644 --- a/src/soc/amd/mendocino/Kconfig +++ b/src/soc/amd/mendocino/Kconfig @@ -61,6 +61,7 @@ config SOC_SPECIFIC_OPTIONS select SOC_AMD_COMMON_BLOCK_APOB_HASH select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_DATA_FABRIC + select SOC_AMD_COMMON_BLOCK_EMMC select SOC_AMD_COMMON_BLOCK_ESPI_EXTENDED_DECODE_RANGES select SOC_AMD_COMMON_BLOCK_GRAPHICS # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_HAS_ESPI diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index 2952d18c4e..9549426694 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -36,7 +36,6 @@ ramstage-y += agesa_acpi.c ramstage-y += chip.c ramstage-y += cpu.c ramstage-y += data_fabric.c -ramstage-y += emmc.c ramstage-y += fch.c ramstage-y += fsp_s_params.c ramstage-y += gpio.c diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb index 2a8d1877ff..5692d64563 100644 --- a/src/soc/amd/mendocino/chipset_mendocino.cb +++ b/src/soc/amd/mendocino/chipset_mendocino.cb @@ -93,5 +93,5 @@ chip soc/amd/mendocino device mmio 0xfedce000 alias uart_2 off ops mendocino_uart_mmio_ops end device mmio 0xfedcf000 alias uart_3 off ops mendocino_uart_mmio_ops end device mmio 0xfedd1000 alias uart_4 off ops mendocino_uart_mmio_ops end - device mmio 0xfedd5000 alias emmc off ops mendocino_emmc_mmio_ops end + device mmio 0xfedd5000 alias emmc off ops amd_emmc_mmio_ops end end diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb index 2a8d1877ff..5692d64563 100644 --- a/src/soc/amd/mendocino/chipset_rembrandt.cb +++ b/src/soc/amd/mendocino/chipset_rembrandt.cb @@ -93,5 +93,5 @@ chip soc/amd/mendocino device mmio 0xfedce000 alias uart_2 off ops mendocino_uart_mmio_ops end device mmio 0xfedcf000 alias uart_3 off ops mendocino_uart_mmio_ops end device mmio 0xfedd1000 alias uart_4 off ops mendocino_uart_mmio_ops end - device mmio 0xfedd5000 alias emmc off ops mendocino_emmc_mmio_ops end + device mmio 0xfedd5000 alias emmc off ops amd_emmc_mmio_ops end end diff --git a/src/soc/amd/mendocino/emmc.c b/src/soc/amd/mendocino/emmc.c deleted file mode 100644 index ae01a1486b..0000000000 --- a/src/soc/amd/mendocino/emmc.c +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <amdblocks/aoac.h> -#include <device/device.h> -#include <soc/aoac_defs.h> - -static void emmc_read_resources(struct device *dev) -{ - mmio_resource_kb(dev, 0, dev->path.mmio.addr / KiB, 4); -} - -static void emmc_enable(struct device *dev) -{ - if (!dev->enabled) - power_off_aoac_device(FCH_AOAC_DEV_EMMC); -} - -struct device_operations mendocino_emmc_mmio_ops = { - .read_resources = emmc_read_resources, - .set_resources = noop_set_resources, - .scan_bus = scan_static_bus, - .enable = emmc_enable, -}; |