aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-30 22:04:34 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-02-01 11:36:41 +0000
commite4594f12cb4c2f02b3764b95887f8f2be869af1d (patch)
tree2e777967800094e7f67102ceeab43f2e4afa7d53 /src/soc/amd/common/block
parentc0474785fb98246e3a62730f08ba6d947c43a53f (diff)
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 <felix-coreboot@felixheld.de> Change-Id: I60ac0e30627001698565b7256421780f9a94bf65 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80266 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/data_fabric/domain.c10
-rw-r--r--src/soc/amd/common/block/include/amdblocks/root_complex.h2
-rw-r--r--src/soc/amd/common/block/root_complex/non_pci_resources.c2
3 files changed, 7 insertions, 7 deletions
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;