summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-08-24 15:12:19 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-01-31 10:36:39 +0000
commit7fcd4d58ec7ea2da31c258ba9d8601f086d7f8d8 (patch)
tree1bddf10cecf4577fee207e0dbc6f7a5c1b10af13 /src/soc/intel
parent3138faa7cf1b91e0b56ad0b1be6260cf4251a284 (diff)
device/device.h: Rename busses for clarity
This renames bus to upstream and link_list to downstream. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I80a81b6b8606e450ff180add9439481ec28c2420 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78330 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/apollolake/chip.c2
-rw-r--r--src/soc/intel/braswell/southcluster.c4
-rw-r--r--src/soc/intel/common/block/acpi/pep.c2
-rw-r--r--src/soc/intel/common/block/lpc/lpc.c4
-rw-r--r--src/soc/intel/common/block/pcie/rtd3/rtd3.c6
-rw-r--r--src/soc/intel/common/block/usb4/pcie.c2
-rw-r--r--src/soc/intel/common/block/xhci/xhci.c4
-rw-r--r--src/soc/intel/denverton_ns/lpc.c4
-rw-r--r--src/soc/intel/meteorlake/fsp_params.c2
-rw-r--r--src/soc/intel/skylake/chip.c2
-rw-r--r--src/soc/intel/xeon_sp/chip_common.c6
-rw-r--r--src/soc/intel/xeon_sp/cpx/soc_acpi.c2
-rw-r--r--src/soc/intel/xeon_sp/skx/soc_acpi.c2
-rw-r--r--src/soc/intel/xeon_sp/spr/soc_acpi.c4
-rw-r--r--src/soc/intel/xeon_sp/uncore.c2
-rw-r--r--src/soc/intel/xeon_sp/uncore_acpi.c2
16 files changed, 25 insertions, 25 deletions
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 469b9be8d1..15780d0971 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -478,7 +478,7 @@ static void parse_devicetree(FSP_S_CONFIG *silconfig)
return;
}
/* Only disable bus 0 devices. */
- for (dev = dev->bus->children; dev; dev = dev->sibling) {
+ for (dev = dev->upstream->children; dev; dev = dev->sibling) {
if (!dev->enabled)
disable_dev(dev, silconfig);
}
diff --git a/src/soc/intel/braswell/southcluster.c b/src/soc/intel/braswell/southcluster.c
index a0df97cdf7..2e3728057d 100644
--- a/src/soc/intel/braswell/southcluster.c
+++ b/src/soc/intel/braswell/southcluster.c
@@ -117,7 +117,7 @@ static void write_pci_config_irqs(void)
continue;
current_bdf = irq_dev->path.pci.devfn |
- irq_dev->bus->secondary << 8;
+ irq_dev->upstream->secondary << 8;
/*
* Step 1: Get the INT_PIN and device structure to look for
@@ -132,7 +132,7 @@ static void write_pci_config_irqs(void)
original_int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN);
parent_bdf = targ_dev->path.pci.devfn
- | targ_dev->bus->secondary << 8;
+ | targ_dev->upstream->secondary << 8;
device_num = PCI_SLOT(parent_bdf);
if (ir->pcidev[device_num] == 0) {
diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c
index 39f95425db..a6ae454d06 100644
--- a/src/soc/intel/common/block/acpi/pep.c
+++ b/src/soc/intel/common/block/acpi/pep.c
@@ -144,7 +144,7 @@ static enum acpi_device_sleep_states get_min_sleep_state(
case DEVICE_PATH_PCI:
/* skip external buses*/
- if ((dev->bus->secondary != 0) || (!states_arr))
+ if ((dev->upstream->secondary != 0) || (!states_arr))
return ACPI_DEVICE_SLEEP_NONE;
for (size_t i = 0; i < size; i++)
if (states_arr[i].pci_dev == dev->path.pci.devfn)
diff --git a/src/soc/intel/common/block/lpc/lpc.c b/src/soc/intel/common/block/lpc/lpc.c
index 994ef9bcb8..dbd982b593 100644
--- a/src/soc/intel/common/block/lpc/lpc.c
+++ b/src/soc/intel/common/block/lpc/lpc.c
@@ -102,10 +102,10 @@ static void pch_lpc_set_child_resources(struct device *dev)
{
struct device *child;
- if (!dev->link_list)
+ if (!dev->downstream)
return;
- for (child = dev->link_list->children; child; child = child->sibling)
+ for (child = dev->downstream->children; child; child = child->sibling)
pch_lpc_loop_resources(child);
}
diff --git a/src/soc/intel/common/block/pcie/rtd3/rtd3.c b/src/soc/intel/common/block/pcie/rtd3/rtd3.c
index 39c82b11f2..3a7c8b4afc 100644
--- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c
+++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c
@@ -140,7 +140,7 @@ pcie_rtd3_acpi_method_on(unsigned int pcie_rp,
enum pcie_rp_type rp_type,
const struct device *dev)
{
- const struct device *parent = dev->bus->dev;
+ const struct device *parent = dev->upstream->dev;
acpigen_write_method_serialized("_ON", 0);
@@ -224,7 +224,7 @@ pcie_rtd3_acpi_method_off(int pcie_rp,
const struct device *dev)
{
- const struct device *parent = dev->bus->dev;
+ const struct device *parent = dev->upstream->dev;
acpigen_write_method_serialized("_OFF", 0);
@@ -385,7 +385,7 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
const struct soc_intel_common_block_pcie_rtd3_config *config = config_of(dev);
static const char *const power_res_states[] = {"_PR0"};
- const struct device *parent = dev->bus->dev;
+ const struct device *parent = dev->upstream->dev;
const char *scope = acpi_device_path(parent);
const struct opregion opregion = OPREGION("PXCS", PCI_CONFIG, 0, 0xff);
const struct fieldlist fieldlist[] = {
diff --git a/src/soc/intel/common/block/usb4/pcie.c b/src/soc/intel/common/block/usb4/pcie.c
index f2414ccb12..c066647d1a 100644
--- a/src/soc/intel/common/block/usb4/pcie.c
+++ b/src/soc/intel/common/block/usb4/pcie.c
@@ -19,7 +19,7 @@ static void usb4_pcie_acpi_fill_ssdt(const struct device *dev)
int port_id;
/* Get parent PCI device */
- parent = dev->bus->dev;
+ parent = dev->upstream->dev;
if (!parent) {
printk(BIOS_ERR, "%s: Unable to find parent device\n", __func__);
return;
diff --git a/src/soc/intel/common/block/xhci/xhci.c b/src/soc/intel/common/block/xhci/xhci.c
index ff6fbf0957..03ed578e27 100644
--- a/src/soc/intel/common/block/xhci/xhci.c
+++ b/src/soc/intel/common/block/xhci/xhci.c
@@ -92,8 +92,8 @@ void usb_xhci_disable_unused(bool (*ext_usb_xhci_en_cb)(unsigned int port_type,
return;
}
- while ((hub = dev_bus_each_child(xhci->link_list, hub)) != NULL) {
- while ((port = dev_bus_each_child(hub->link_list, port)) != NULL) {
+ while ((hub = dev_bus_each_child(xhci->downstream, hub)) != NULL) {
+ while ((port = dev_bus_each_child(hub->downstream, port)) != NULL) {
enable = true;
config = config_of(port);
if (config->type == UPC_TYPE_INTERNAL) {
diff --git a/src/soc/intel/denverton_ns/lpc.c b/src/soc/intel/denverton_ns/lpc.c
index 7ebca1eb94..ae923d7c0e 100644
--- a/src/soc/intel/denverton_ns/lpc.c
+++ b/src/soc/intel/denverton_ns/lpc.c
@@ -275,7 +275,7 @@ static u8 dnv_get_int_line(struct device *irq_dev)
/* Swizzle this device if needed */
config = targ_dev->chip_info;
- parent_bdf = targ_dev->path.pci.devfn | targ_dev->bus->secondary << 8;
+ parent_bdf = targ_dev->path.pci.devfn | targ_dev->upstream->secondary << 8;
if (is_dnv_swizzled_rp(parent_bdf) && irq_dev != targ_dev) {
swiz_int_pin = dnv_get_swizzled_pin(config, parent_bdf, new_int_pin);
printk(BIOS_DEBUG, "%s: dnv swizzle %s from %c to %c\n", __func__,
@@ -387,7 +387,7 @@ static void pch_pirq_init(struct device *dev)
int_line = dnv_get_int_line(irq_dev);
printk(BIOS_DEBUG, "%s: %02x:%02x.%d pin %d int line %d\n", __func__,
- irq_dev->bus->secondary, devfn >> 3, devfn & 0x7, int_pin, int_line);
+ irq_dev->upstream->secondary, devfn >> 3, devfn & 0x7, int_pin, int_line);
pci_write_config8(irq_dev, PCI_INTERRUPT_LINE, int_line);
}
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c
index c3c478544e..971fa3360d 100644
--- a/src/soc/intel/meteorlake/fsp_params.c
+++ b/src/soc/intel/meteorlake/fsp_params.c
@@ -760,7 +760,7 @@ static void fill_fsps_pci_ssid_params(FSP_S_CONFIG *s_cfg,
for (dev = all_devices; dev; dev = dev->next) {
if (!(is_dev_enabled(dev) && dev->path.type == DEVICE_PATH_PCI &&
- dev->bus->secondary == 0))
+ dev->upstream->secondary == 0))
continue;
if (dev->path.pci.devfn == PCI_DEVFN_ROOT) {
diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c
index f471edb960..ea091ce0ac 100644
--- a/src/soc/intel/skylake/chip.c
+++ b/src/soc/intel/skylake/chip.c
@@ -94,7 +94,7 @@ const char *soc_acpi_name(const struct device *dev)
return NULL;
/* Match functions 0 and 1 for possible GPUs on a secondary bus */
- if (dev->bus && dev->bus->secondary > 0) {
+ if (dev->upstream && dev->upstream->secondary > 0) {
switch (PCI_FUNC(dev->path.pci.devfn)) {
case 0: return "DEV0";
case 1: return "DEV1";
diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c
index 845e968a62..144dba1665 100644
--- a/src/soc/intel/xeon_sp/chip_common.c
+++ b/src/soc/intel/xeon_sp/chip_common.c
@@ -78,7 +78,7 @@ void iio_pci_domain_scan_bus(struct device *dev)
bus->max_subordinate = sr->BusLimit;
printk(BIOS_SPEW, "Scanning IIO stack %d: busses %x-%x\n", dev->path.domain.domain,
- dev->link_list->secondary, dev->link_list->max_subordinate);
+ dev->downstream->secondary, dev->downstream->max_subordinate);
pci_host_bridge_scan_bus(dev);
}
@@ -116,14 +116,14 @@ void attach_iio_stacks(struct device *dev)
if (!is_pcie_iio_stack_res(ri)) {
if (CONFIG(HAVE_IOAT_DOMAINS))
- soc_create_ioat_domains(dn, dev->bus, ri);
+ soc_create_ioat_domains(dn, dev->upstream, ri);
continue;
}
struct device_path path;
path.type = DEVICE_PATH_DOMAIN;
path.domain.domain = dn.domain_path;
- struct device *iio_domain = alloc_dev(dev->bus, &path);
+ struct device *iio_domain = alloc_dev(dev->upstream, &path);
if (iio_domain == NULL)
die("%s: out of memory.\n", __func__);
iio_domain->ops = &iio_pcie_domain_ops;
diff --git a/src/soc/intel/xeon_sp/cpx/soc_acpi.c b/src/soc/intel/xeon_sp/cpx/soc_acpi.c
index 2c19ed1198..8b24ba2b52 100644
--- a/src/soc/intel/xeon_sp/cpx/soc_acpi.c
+++ b/src/soc/intel/xeon_sp/cpx/soc_acpi.c
@@ -46,7 +46,7 @@ void uncore_fill_ssdt(const struct device *device)
struct iiostack_resource stack_info = {0};
/* Only add RTxx entries once. */
- if (device->bus->secondary != 0 || device->bus->segment_group != 0)
+ if (device->upstream->secondary != 0 || device->upstream->segment_group != 0)
return;
get_iiostack_info(&stack_info);
diff --git a/src/soc/intel/xeon_sp/skx/soc_acpi.c b/src/soc/intel/xeon_sp/skx/soc_acpi.c
index dfbd878793..2e2b14a2cc 100644
--- a/src/soc/intel/xeon_sp/skx/soc_acpi.c
+++ b/src/soc/intel/xeon_sp/skx/soc_acpi.c
@@ -59,7 +59,7 @@ void uncore_fill_ssdt(const struct device *device)
const IIO_UDS *hob = get_iio_uds();
/* Only add RTxx entries once. */
- if (device->bus->secondary != 0)
+ if (device->upstream->secondary != 0)
return;
for (int socket = 0, iio = 0; iio < hob->PlatformData.numofIIO; ++socket) {
diff --git a/src/soc/intel/xeon_sp/spr/soc_acpi.c b/src/soc/intel/xeon_sp/spr/soc_acpi.c
index cb7fe1daf1..a48302cf2e 100644
--- a/src/soc/intel/xeon_sp/spr/soc_acpi.c
+++ b/src/soc/intel/xeon_sp/spr/soc_acpi.c
@@ -341,7 +341,7 @@ void uncore_fill_ssdt(const struct device *device)
bool stack_enabled;
/* Only add RTxx entries once. */
- if (device->bus->secondary != 0)
+ if (device->upstream->secondary != 0)
return;
/*
@@ -502,7 +502,7 @@ unsigned long xeonsp_acpi_create_madt_lapics(unsigned long current)
for (cpu = all_devices; cpu; cpu = cpu->next) {
if ((cpu->path.type != DEVICE_PATH_APIC)
- || (cpu->bus->dev->path.type != DEVICE_PATH_CPU_CLUSTER)) {
+ || (cpu->upstream->dev->path.type != DEVICE_PATH_CPU_CLUSTER)) {
continue;
}
if (!cpu->enabled)
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c
index 1b232ea208..ddc6e8206f 100644
--- a/src/soc/intel/xeon_sp/uncore.c
+++ b/src/soc/intel/xeon_sp/uncore.c
@@ -192,7 +192,7 @@ static void mc_add_dram_resources(struct device *dev, int *res_count)
struct range_entry fsp_mem;
/* Only add dram resources once. */
- if (dev->bus->secondary != 0 || dev->bus->segment_group != 0)
+ if (dev->upstream->secondary != 0 || dev->upstream->segment_group != 0)
return;
/* Read in the MAP registers and report their values. */
diff --git a/src/soc/intel/xeon_sp/uncore_acpi.c b/src/soc/intel/xeon_sp/uncore_acpi.c
index e2b47329ac..75b281bd8d 100644
--- a/src/soc/intel/xeon_sp/uncore_acpi.c
+++ b/src/soc/intel/xeon_sp/uncore_acpi.c
@@ -225,7 +225,7 @@ static unsigned long acpi_create_dmar_ds_pci_br_for_port(unsigned long current,
uint32_t pcie_seg,
bool is_atsr, bool *first)
{
- const uint32_t bus = bridge_dev->bus->secondary;
+ const uint32_t bus = bridge_dev->upstream->secondary;
const uint32_t dev = PCI_SLOT(bridge_dev->path.pci.devfn);
const uint32_t func = PCI_FUNC(bridge_dev->path.pci.devfn);