Debian Codegraph @

src/soc/intel/braswell/emmc.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
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>
8
9 #include <soc/device_nvs.h>
10 #include <soc/iosf.h>
11 #include <soc/pci_devs.h>
12 #include <soc/ramstage.h>
13 #include "chip.h"
14
15 static const struct reg_script emmc_ops[] = {
16 REG_SCRIPT_END,
17 };
18
19 static void emmc_init(struct device *dev)
20 {
21 struct soc_intel_braswell_config *config = config_of(dev);
22
23 printk(BIOS_DEBUG, "eMMC init\n");
24 reg_script_run_on_dev(dev, emmc_ops);
25
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);
29 }
30 }
31
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,
36 .init = emmc_init,
37 .ops_pci = &soc_pci_ops,
38 };
39
40 static const struct pci_driver southcluster __pci_driver = {
41 .ops = &emmc_device_ops,
42 .vendor = PCI_VID_INTEL,
43 .device = MMC_DEVID,
44 };