diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-08-24 15:12:19 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-29 18:23:22 +0000 |
commit | 80c79a5dc31cca9f157cd2f35f435dfa7648ce11 (patch) | |
tree | 0f1bcc76e774ef03808e1b1e5f531d5464aff9e4 /src/include/device | |
parent | 27ce0ec2b62bf824a94dfeaf223a08bd26465fcd (diff) |
device/device.h: Drop multiple links
Multiple links are unused throughout the tree and make the code more
confusing as an iteration over all busses is needed to get downstream
devices. This also not done consistently e.g. the allocator does not
care about multiple links on busses. A better way of dealing multiple
links below a device is to feature dummy devices with each their
respective bus.
This drops the sconfig capability to declare the same device multiple
times which was previously used to declare multiple links.
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Iab6fe269faef46ae77ed1ea425440cf5c7dbd49b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78328
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/include/device')
-rw-r--r-- | src/include/device/device.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h index 13bc8dcb34..b7917e3693 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -4,11 +4,13 @@ #define DEVICE_H -#include <device/resource.h> +#include <console/console.h> #include <device/path.h> #include <device/pci_type.h> +#include <device/resource.h> #include <smbios.h> #include <static.h> +#include <stdlib.h> #include <types.h> struct fw_config; @@ -78,10 +80,8 @@ static inline void noop_set_resources(struct device *dev) {} struct bus { DEVTREE_CONST struct device *dev; /* This bridge device */ DEVTREE_CONST struct device *children; /* devices behind this bridge */ - DEVTREE_CONST struct bus *next; /* The next bridge on this device */ unsigned int bridge_ctrl; /* Bridge control register */ uint16_t bridge_cmd; /* Bridge command register */ - unsigned char link_num; /* The index of this link */ uint16_t secondary; /* secondary bus number */ uint16_t subordinate; /* subordinate bus number */ uint16_t max_subordinate; /* max subordinate bus number */ @@ -193,7 +193,6 @@ struct device *dev_get_pci_domain(struct device *dev); void dev_set_enabled(struct device *dev, int enable); void disable_children(struct bus *bus); bool dev_is_active_bridge(struct device *dev); -void add_more_links(struct device *dev, unsigned int total_links); bool is_dev_enabled(const struct device *const dev); bool is_devfn_enabled(unsigned int devfn); bool is_cpu(const struct device *cpu); |