1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include <reg_script.h>
9 #include <soc/device_nvs.h>
11 #include <soc/pci_devs.h>
12 #include <soc/ramstage.h>
15 static const struct reg_script emmc_ops
[] = {
19 static void emmc_init(struct device
*dev
)
21 struct soc_intel_braswell_config
*config
= config_of(dev
);
23 printk(BIOS_DEBUG
, "eMMC init\n");
24 reg_script_run_on_dev(dev
, emmc_ops
);
26 if (config
->emmc_acpi_mode
) {
27 printk(BIOS_DEBUG
, "Enabling ACPI mode\n");
28 scc_enable_acpi_mode(dev
, SCC_MMC_CTL
, SCC_NVS_MMC
);
32 static struct device_operations emmc_device_ops
= {
33 .read_resources
= pci_dev_read_resources
,
34 .set_resources
= pci_dev_set_resources
,
35 .enable_resources
= pci_dev_enable_resources
,
37 .ops_pci
= &soc_pci_ops
,
40 static const struct pci_driver southcluster __pci_driver
= {
41 .ops
= &emmc_device_ops
,
42 .vendor
= PCI_VID_INTEL
,