From e4594f12cb4c2f02b3764b95887f8f2be869af1d Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 30 Jan 2024 22:04:34 +0100 Subject: soc/amd/common/data_fabric/domain: use unsigned long for resource index Use an unsigned long as resource index type instead of an int to match the data type used for the index in the resource struct. Signed-off-by: Felix Held Change-Id: I60ac0e30627001698565b7256421780f9a94bf65 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80266 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Varshit Pandya --- src/soc/amd/common/block/data_fabric/domain.c | 10 +++++----- src/soc/amd/common/block/include/amdblocks/root_complex.h | 2 +- src/soc/amd/common/block/root_complex/non_pci_resources.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/soc/amd/common/block') diff --git a/src/soc/amd/common/block/data_fabric/domain.c b/src/soc/amd/common/block/data_fabric/domain.c index 7bcc01bf93..8533dffcc4 100644 --- a/src/soc/amd/common/block/data_fabric/domain.c +++ b/src/soc/amd/common/block/data_fabric/domain.c @@ -78,7 +78,7 @@ static bool is_mmio_region_valid(unsigned int reg, resource_t mmio_base, resourc return true; } -static void report_data_fabric_mmio(struct device *domain, unsigned int idx, +static void report_data_fabric_mmio(struct device *domain, unsigned long idx, resource_t mmio_base, resource_t mmio_limit) { struct resource *res; @@ -89,7 +89,7 @@ static void report_data_fabric_mmio(struct device *domain, unsigned int idx, } /* Tell the resource allocator about the usable MMIO ranges configured in the data fabric */ -static void add_data_fabric_mmio_regions(struct device *domain, unsigned int *idx) +static void add_data_fabric_mmio_regions(struct device *domain, unsigned long *idx) { const signed int iohc_dest_fabric_id = get_iohc_fabric_id(domain); union df_mmio_control ctrl; @@ -140,7 +140,7 @@ static void add_data_fabric_mmio_regions(struct device *domain, unsigned int *id } } -static void report_data_fabric_io(struct device *domain, unsigned int idx, +static void report_data_fabric_io(struct device *domain, unsigned long idx, resource_t io_base, resource_t io_limit) { struct resource *res; @@ -151,7 +151,7 @@ static void report_data_fabric_io(struct device *domain, unsigned int idx, } /* Tell the resource allocator about the usable I/O space */ -static void add_data_fabric_io_regions(struct device *domain, unsigned int *idx) +static void add_data_fabric_io_regions(struct device *domain, unsigned long *idx) { const signed int iohc_dest_fabric_id = get_iohc_fabric_id(domain); union df_io_base base_reg; @@ -193,7 +193,7 @@ static void add_data_fabric_io_regions(struct device *domain, unsigned int *idx) void amd_pci_domain_read_resources(struct device *domain) { - unsigned int idx = 0; + unsigned long idx = 0; add_data_fabric_io_regions(domain, &idx); diff --git a/src/soc/amd/common/block/include/amdblocks/root_complex.h b/src/soc/amd/common/block/include/amdblocks/root_complex.h index dd0e68ad2c..d774af0d3b 100644 --- a/src/soc/amd/common/block/include/amdblocks/root_complex.h +++ b/src/soc/amd/common/block/include/amdblocks/root_complex.h @@ -20,7 +20,7 @@ struct non_pci_mmio_reg { unsigned long res_idx; /* Use NON_PCI_RES_IDX_AUTO or a specific resource index */ }; -void read_non_pci_resources(struct device *domain, unsigned int *idx); +void read_non_pci_resources(struct device *domain, unsigned long *idx); uint32_t get_iohc_misc_smn_base(struct device *domain); const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count); diff --git a/src/soc/amd/common/block/root_complex/non_pci_resources.c b/src/soc/amd/common/block/root_complex/non_pci_resources.c index 31f4eb0565..54f3de276f 100644 --- a/src/soc/amd/common/block/root_complex/non_pci_resources.c +++ b/src/soc/amd/common/block/root_complex/non_pci_resources.c @@ -7,7 +7,7 @@ #define IOHC_MMIO_EN BIT(0) -void read_non_pci_resources(struct device *domain, unsigned int *idx) +void read_non_pci_resources(struct device *domain, unsigned long *idx) { const uint32_t iohc_misc_base = get_iohc_misc_smn_base(domain); const struct non_pci_mmio_reg *regs; -- cgit v1.2.3