soc/mediatek/mt8196: Correct the region size for mcufw_reserved
[coreboot2.git] / src / soc / amd / common / block / emmc / emmc.c
blob9242d715512c75a78aa4f57f1e940ee490d1489b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpigen.h>
4 #include <amdblocks/aoac.h>
5 #include <device/device.h>
6 #include <soc/aoac_defs.h>
8 static void emmc_read_resources(struct device *dev)
10 mmio_range(dev, 0, dev->path.mmio.addr, 4 * KiB);
13 static void emmc_enable(struct device *dev)
15 if (!dev->enabled && !CONFIG(SOC_AMD_COMMON_BLOCK_EMMC_SKIP_POWEROFF))
16 power_off_aoac_device(FCH_AOAC_DEV_EMMC);
19 static const char *emmc_acpi_name(const struct device *dev)
21 return "MMC0";
24 static void emmc_acpi_fill_ssdt(const struct device *dev)
26 acpigen_write_scope(acpi_device_path(dev));
27 acpigen_write_store_int_to_namestr(acpi_device_status(dev), "STAT");
28 acpigen_pop_len(); /* Scope */
31 struct device_operations amd_emmc_mmio_ops = {
32 .read_resources = emmc_read_resources,
33 .set_resources = noop_set_resources,
34 .scan_bus = scan_static_bus,
35 .enable = emmc_enable,
36 .acpi_name = emmc_acpi_name,
37 .acpi_fill_ssdt = emmc_acpi_fill_ssdt,