summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/xeon_sp/chip_common.c2
-rw-r--r--src/soc/intel/xeon_sp/include/soc/chip_common.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c
index d0e01bc7cf..ef504d7f0a 100644
--- a/src/soc/intel/xeon_sp/chip_common.c
+++ b/src/soc/intel/xeon_sp/chip_common.c
@@ -199,7 +199,7 @@ void iio_pci_domain_read_resources(struct device *dev)
int index = 0;
- if (dev->path.domain.domain == 0) {
+ if (is_domain0(dev)) {
/* The 0 - 0xfff IO range is not reported by the HOB but still gets decoded */
res = new_resource(dev, index++);
res->base = 0;
diff --git a/src/soc/intel/xeon_sp/include/soc/chip_common.h b/src/soc/intel/xeon_sp/include/soc/chip_common.h
index 40c7ffa377..53deffa7f4 100644
--- a/src/soc/intel/xeon_sp/include/soc/chip_common.h
+++ b/src/soc/intel/xeon_sp/include/soc/chip_common.h
@@ -77,4 +77,9 @@ bool is_cxl_domain(struct device *dev);
#define is_dev_on_ubox_domain(dev) is_ubox_domain(dev_get_pci_domain(dev))
#define is_dev_on_cxl_domain(dev) is_cxl_domain(dev_get_pci_domain(dev))
+#define is_domain0(dev) (dev && dev->path.type == DEVICE_PATH_DOMAIN &&\
+ dev->path.domain.domain == 0)
+#define is_dev_on_domain0(dev) (is_domain0(dev_get_pci_domain(dev)))
+#define is_stack0(socket, stack) (socket == 0 && stack == IioStack0)
+
#endif /* _CHIP_COMMON_H_ */