diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-08-24 15:12:19 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-31 10:36:39 +0000 |
commit | 7fcd4d58ec7ea2da31c258ba9d8601f086d7f8d8 (patch) | |
tree | 1bddf10cecf4577fee207e0dbc6f7a5c1b10af13 /src/device/device_const.c | |
parent | 3138faa7cf1b91e0b56ad0b1be6260cf4251a284 (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/device/device_const.c')
-rw-r--r-- | src/device/device_const.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/device/device_const.c b/src/device/device_const.c index c91c00908d..0521c7e8a4 100644 --- a/src/device/device_const.c +++ b/src/device/device_const.c @@ -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; |