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/mainboard/siemens | |
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/mainboard/siemens')
6 files changed, 15 insertions, 15 deletions
diff --git a/src/mainboard/siemens/fa_ehl/mainboard.c b/src/mainboard/siemens/fa_ehl/mainboard.c index 7aa0d86453..ac16346f2a 100644 --- a/src/mainboard/siemens/fa_ehl/mainboard.c +++ b/src/mainboard/siemens/fa_ehl/mainboard.c @@ -42,7 +42,7 @@ static uint8_t is_mac_adr_valid(uint8_t mac[MAC_ADDR_LEN]) */ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN]) { - struct bus *parent = dev->bus; + struct bus *parent = dev->upstream; uint8_t buf[16], mapping[16], i = 0, chain_len = 0; memset(buf, 0, sizeof(buf)); @@ -51,10 +51,10 @@ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_L /* The first entry in the tree is the device itself. */ buf[0] = dev->path.pci.devfn; chain_len = 1; - for (i = 1; i < MAX_PATH_DEPTH && parent->dev->bus->subordinate; i++) { + for (i = 1; i < MAX_PATH_DEPTH && parent->dev->upstream->subordinate; i++) { buf[i] = parent->dev->path.pci.devfn; chain_len++; - parent = parent->dev->bus; + parent = parent->dev->upstream; } if (i == MAX_PATH_DEPTH) { /* The path is deeper than MAX_PATH_DEPTH devices, error. */ diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c index 0593797b11..51427be49e 100644 --- a/src/mainboard/siemens/mc_apl1/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/mainboard.c @@ -55,7 +55,7 @@ static uint8_t is_mac_adr_valid(uint8_t mac[MAC_ADDR_LEN]) */ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN]) { - struct bus *parent = dev->bus; + struct bus *parent = dev->upstream; uint8_t buf[16], mapping[16], i = 0, chain_len = 0; memset(buf, 0, sizeof(buf)); @@ -64,10 +64,10 @@ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_L /* The first entry in the tree is the device itself. */ buf[0] = dev->path.pci.devfn; chain_len = 1; - for (i = 1; i < MAX_PATH_DEPTH && parent->dev->bus->subordinate; i++) { + for (i = 1; i < MAX_PATH_DEPTH && parent->dev->upstream->subordinate; i++) { buf[i] = parent->dev->path.pci.devfn; chain_len++; - parent = parent->dev->bus; + parent = parent->dev->upstream; } if (i == MAX_PATH_DEPTH) { /* The path is deeper than MAX_PATH_DEPTH devices, error. */ diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c index b61f32df49..c6beff65e5 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c @@ -41,7 +41,7 @@ void variant_mainboard_final(void) /* Disable clock outputs 0 and 2-4 (CLKOUT) for upstream XIO2001 PCIe to PCI Bridge. */ - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x1d); } @@ -50,7 +50,7 @@ void variant_mainboard_final(void) mainboard. */ dev = dev_find_device(PCI_VID_SIEMENS, 0x403f, 0); if (dev) { - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x3c); } diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c index 8eedce6d6c..eda4b1bf74 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c @@ -51,7 +51,7 @@ void variant_mainboard_final(void) /* Disable clock outputs 0-3 (CLKOUT) for upstream XIO2001 PCIe to PCI Bridge. */ - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x0f); } @@ -60,7 +60,7 @@ void variant_mainboard_final(void) mainboard. */ dev = dev_find_device(PCI_VID_SIEMENS, 0x403f, 0); if (dev) { - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x3e); } diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c index 1856a35b3c..a5fe3d7e03 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c @@ -41,7 +41,7 @@ void variant_mainboard_final(void) /* Disable clock outputs 0-3 (CLKOUT) for upstream XIO2001 PCIe to PCI Bridge. */ - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x0F); } @@ -50,7 +50,7 @@ void variant_mainboard_final(void) mainboard. */ dev = dev_find_device(PCI_VID_SIEMENS, 0x403f, 0); if (dev) { - struct device *parent = dev->bus->dev; + struct device *parent = dev->upstream->dev; if (parent && parent->device == PCI_DID_TI_XIO2001) pci_write_config8(parent, 0xd8, 0x3c); } diff --git a/src/mainboard/siemens/mc_ehl/mainboard.c b/src/mainboard/siemens/mc_ehl/mainboard.c index 7aa0d86453..ac16346f2a 100644 --- a/src/mainboard/siemens/mc_ehl/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/mainboard.c @@ -42,7 +42,7 @@ static uint8_t is_mac_adr_valid(uint8_t mac[MAC_ADDR_LEN]) */ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN]) { - struct bus *parent = dev->bus; + struct bus *parent = dev->upstream; uint8_t buf[16], mapping[16], i = 0, chain_len = 0; memset(buf, 0, sizeof(buf)); @@ -51,10 +51,10 @@ enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_L /* The first entry in the tree is the device itself. */ buf[0] = dev->path.pci.devfn; chain_len = 1; - for (i = 1; i < MAX_PATH_DEPTH && parent->dev->bus->subordinate; i++) { + for (i = 1; i < MAX_PATH_DEPTH && parent->dev->upstream->subordinate; i++) { buf[i] = parent->dev->path.pci.devfn; chain_len++; - parent = parent->dev->bus; + parent = parent->dev->upstream; } if (i == MAX_PATH_DEPTH) { /* The path is deeper than MAX_PATH_DEPTH devices, error. */ |