From 80c79a5dc31cca9f157cd2f35f435dfa7648ce11 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 24 Aug 2023 15:12:19 +0200 Subject: 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 Change-Id: Iab6fe269faef46ae77ed1ea425440cf5c7dbd49b Reviewed-on: https://review.coreboot.org/c/coreboot/+/78328 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) Reviewed-by: Jincheng Li Reviewed-by: Lean Sheng Tan --- src/include/device/device.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/include/device') 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 +#include #include #include +#include #include #include +#include #include 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); -- cgit v1.2.3