summaryrefslogtreecommitdiff
path: root/src/include/device/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device/device.h')
-rw-r--r--src/include/device/device.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 1b2e097772..901f717624 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -9,7 +9,6 @@
#include <device/pci_type.h>
#include <device/resource.h> /* IWYU pragma: export */
#include <smbios.h>
-#include <static.h>
#include <stdlib.h>
#include <types.h>
@@ -150,6 +149,7 @@ struct device {
/* Zero-terminated array of fields and options to probe. */
DEVTREE_CONST struct fw_config *probe_list;
+ bool enable_on_unprovisioned_fw_config;
};
/**
@@ -183,9 +183,10 @@ const char *dev_name(const struct device *dev);
const char *dev_path(const struct device *dev);
u32 dev_path_encode(const struct device *dev);
const struct device *dev_get_domain(const struct device *dev);
+unsigned int dev_get_domain_id(const 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);
+bool dev_is_active_bridge(const struct device *dev);
bool is_dev_enabled(const struct device *const dev);
bool is_devfn_enabled(unsigned int devfn);
bool is_cpu(const struct device *cpu);
@@ -194,6 +195,9 @@ bool is_pci(const struct device *pci);
bool is_enabled_pci(const struct device *pci);
bool is_pci_dev_on_bus(const struct device *pci, unsigned int bus);
bool is_pci_bridge(const struct device *pci);
+bool is_pci_ioapic(const struct device *pci);
+bool is_domain0(const struct device *dev);
+bool is_dev_on_domain0(const struct device *dev);
/* Returns whether there is a hotplug port on the path to the given device. */
bool dev_path_hotplug(const struct device *);
@@ -483,12 +487,6 @@ static inline DEVTREE_CONST void *config_of(const struct device *dev)
devtree_die();
}
-/*
- * Returns pointer to config structure of root device (B:D:F = 0:00:0) defined by
- * sconfig in static.{h/c}.
- */
-#define config_of_soc() __pci_0_00_0_config
-
static inline bool is_root_device(const struct device *dev)
{
if (!dev || !dev->upstream)
@@ -504,12 +502,4 @@ void scan_smbus(struct device *bus);
void scan_generic_bus(struct device *bus);
void scan_static_bus(struct device *bus);
-/* Macro to generate `struct device *` name that points to a device with the given alias. */
-#define DEV_PTR(_alias) _dev_##_alias##_ptr
-
-/* Macro to generate weak `struct device *` definition that points to a device with the given
- alias. */
-#define WEAK_DEV_PTR(_alias) \
- __weak DEVTREE_CONST struct device *const DEV_PTR(_alias)
-
#endif /* DEVICE_H */