soc: Remove copyright notices
[coreboot.git] / src / soc / intel / broadwell / chip.c
blob6c5b3a4bfd8ebf6021884a86b41305d08881b649
1 /*
2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <device/device.h>
16 #include <device/pci.h>
17 #include <soc/acpi.h>
18 #include <soc/pci_devs.h>
19 #include <soc/ramstage.h>
20 #include <soc/intel/broadwell/chip.h>
22 static void pci_domain_set_resources(struct device *dev)
24 assign_resources(dev->link_list);
27 static struct device_operations pci_domain_ops = {
28 .read_resources = &pci_domain_read_resources,
29 .set_resources = &pci_domain_set_resources,
30 .scan_bus = &pci_domain_scan_bus,
31 #if CONFIG(HAVE_ACPI_TABLES)
32 .write_acpi_tables = &northbridge_write_acpi_tables,
33 #endif
36 static struct device_operations cpu_bus_ops = {
37 .read_resources = DEVICE_NOOP,
38 .set_resources = DEVICE_NOOP,
39 .enable_resources = DEVICE_NOOP,
40 .init = &broadwell_init_cpus,
43 static void broadwell_enable(struct device *dev)
45 /* Set the operations if it is a special bus type */
46 if (dev->path.type == DEVICE_PATH_DOMAIN) {
47 dev->ops = &pci_domain_ops;
48 } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
49 dev->ops = &cpu_bus_ops;
50 } else if (dev->path.type == DEVICE_PATH_PCI) {
51 /* Handle PCH device enable */
52 if (PCI_SLOT(dev->path.pci.devfn) > SA_DEV_SLOT_MINIHD &&
53 (dev->ops == NULL || dev->ops->enable == NULL)) {
54 broadwell_pch_enable_dev(dev);
59 struct chip_operations soc_intel_broadwell_ops = {
60 CHIP_NAME("Intel Broadwell")
61 .enable_dev = &broadwell_enable,
62 .init = &broadwell_init_pre_device,
65 struct pci_operations broadwell_pci_ops = {
66 .set_subsystem = &pci_dev_set_subsystem