diff options
Diffstat (limited to 'src/soc/amd/cezanne/emmc.c')
-rw-r--r-- | src/soc/amd/cezanne/emmc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/emmc.c b/src/soc/amd/cezanne/emmc.c new file mode 100644 index 0000000000..a699b20f51 --- /dev/null +++ b/src/soc/amd/cezanne/emmc.c @@ -0,0 +1,23 @@ +/* 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 cezanne_emmc_mmio_ops = { + .read_resources = emmc_read_resources, + .set_resources = noop_set_resources, + .scan_bus = scan_static_bus, + .enable = emmc_enable, +}; |