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>
This commit is contained in:
committed by
Felix Held
parent
3138faa7cf
commit
7fcd4d58ec
@@ -34,8 +34,8 @@ static DEVTREE_CONST struct device *dev_find_slot(unsigned int bus,
|
||||
result = 0;
|
||||
for (dev = all_devices; dev; dev = dev->next) {
|
||||
if ((dev->path.type == DEVICE_PATH_PCI) &&
|
||||
(dev->bus->secondary == bus) &&
|
||||
(dev->bus->segment_group == 0) &&
|
||||
(dev->upstream->secondary == bus) &&
|
||||
(dev->upstream->segment_group == 0) &&
|
||||
(dev->path.pci.devfn == devfn)) {
|
||||
result = dev;
|
||||
break;
|
||||
@@ -210,7 +210,7 @@ DEVTREE_CONST struct device *find_dev_nested_path(
|
||||
if (nested_path_length == 1 || !child)
|
||||
return child;
|
||||
|
||||
return find_dev_nested_path(child->link_list, nested_path + 1, nested_path_length - 1);
|
||||
return find_dev_nested_path(child->downstream, nested_path + 1, nested_path_length - 1);
|
||||
}
|
||||
|
||||
DEVTREE_CONST struct device *pcidev_path_behind(
|
||||
@@ -234,8 +234,8 @@ DEVTREE_CONST struct device *pcidev_path_on_bus(unsigned int bus, pci_devfn_t de
|
||||
dev = dev->next;
|
||||
continue;
|
||||
}
|
||||
if (dev->bus->secondary == bus && dev->bus->segment_group == 0)
|
||||
return pcidev_path_behind(dev->bus, devfn);
|
||||
if (dev->upstream->secondary == bus && dev->upstream->segment_group == 0)
|
||||
return pcidev_path_behind(dev->upstream, devfn);
|
||||
dev = dev->next;
|
||||
}
|
||||
return NULL;
|
||||
@@ -253,7 +253,7 @@ DEVTREE_CONST struct bus *pci_root_bus(void)
|
||||
if (!pci_domain)
|
||||
return NULL;
|
||||
|
||||
pci_root = pci_domain->link_list;
|
||||
pci_root = pci_domain->downstream;
|
||||
return pci_root;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ DEVTREE_CONST struct device *pcidev_path_behind_pci2pci_bridge(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pcidev_path_behind(bridge->link_list, devfn);
|
||||
return pcidev_path_behind(bridge->downstream, devfn);
|
||||
}
|
||||
|
||||
DEVTREE_CONST struct device *pcidev_path_on_root_debug(pci_devfn_t devfn, const char *func)
|
||||
@@ -317,7 +317,7 @@ DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,
|
||||
result = 0;
|
||||
for (dev = all_devices; dev; dev = dev->next) {
|
||||
if ((dev->path.type == DEVICE_PATH_I2C) &&
|
||||
(dev->bus->secondary == bus) &&
|
||||
(dev->upstream->secondary == bus) &&
|
||||
(dev->path.i2c.device == addr)) {
|
||||
result = dev;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user