From 165893b67be4a116a96b242bf4ee5370ec707b43 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 6 Nov 2020 12:15:41 +0100 Subject: soc/intel/xeon_sp: Change the return type of get_iio_stack_info() The somewhat unrelated return value makes the function harder to understand and the return type is not consistently used. Use a different helper function to get the HOB Pci64BitResourceAllocation data. Change-Id: I9a03cbb0ebbb48cc052d4c082d359c0087aaeb3e Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/47298 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- src/soc/intel/xeon_sp/chip_common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/xeon_sp/chip_common.c') diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index 5c78780656..47d8f5cc80 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -403,6 +403,13 @@ static void assign_stack_resources(struct iiostack_resource *stack_list, } } +static uint8_t is_pci64bit_alloc(void) +{ + const IIO_UDS *hob = get_iio_uds(); + + return hob->PlatformData.Pci64BitResourceAllocation; +} + static void xeonsp_pci_domain_read_resources(struct device *dev) { struct bus *link; @@ -425,8 +432,8 @@ static void xeonsp_pci_domain_read_resources(struct device *dev) xeonsp_pci_dev_iterator(link, xeonsp_reset_pci_op, NULL, NULL); struct iiostack_resource stack_info = {0}; - uint8_t pci64bit_alloc_flag = get_iiostack_info(&stack_info); - if (!pci64bit_alloc_flag) { + get_iiostack_info(&stack_info); + if (!is_pci64bit_alloc()) { /* * Split 32 bit address space between prefetchable and * non-prefetchable windows -- cgit v1.2.3