summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2024-01-11 18:50:50 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-17 15:53:19 +0000
commitf55b711c07f6454c38a2de31c3eef5d489e639dd (patch)
tree7f120c81a7d43659a8a24aadbecd952eb3c0335c /src/soc/qualcomm
parentd5ed888367d7a59268327eba21642b25734df664 (diff)
tree: More use accessor functions for struct region fields
Always use the high-level API region_offset() and region_sz() functions. This excludes the internal `region.c` code as well as unit tests. FIT payload support was also skipped, as it seems it never tried to use the API and would need a bigger overhaul. Change-Id: I18f1e37a06783aecde9024c15876b67bfeed70ee Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79955 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/qualcomm')
-rw-r--r--src/soc/qualcomm/common/qclib.c4
-rw-r--r--src/soc/qualcomm/sc7180/soc.c2
-rw-r--r--src/soc/qualcomm/sc7280/soc.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/qualcomm/common/qclib.c b/src/soc/qualcomm/common/qclib.c
index cfe3e2ac1e..56fd3bf6a1 100644
--- a/src/soc/qualcomm/common/qclib.c
+++ b/src/soc/qualcomm/common/qclib.c
@@ -106,8 +106,8 @@ static void write_ddr_information(struct qclib_cb_if_table_entry *te)
ddr_region->size = ddr_size * MiB;
/* Use DDR info to configure MMU */
- qc_mmu_dram_config_post_dram_init((void *)ddr_region->offset,
- (size_t)ddr_region->size);
+ qc_mmu_dram_config_post_dram_init(
+ (void *)(uintptr_t)region_offset(ddr_region), region_sz(ddr_region));
}
static void write_qclib_log_to_cbmemc(struct qclib_cb_if_table_entry *te)
diff --git a/src/soc/qualcomm/sc7180/soc.c b/src/soc/qualcomm/sc7180/soc.c
index d8df98ace7..cef7e8f8c5 100644
--- a/src/soc/qualcomm/sc7180/soc.c
+++ b/src/soc/qualcomm/sc7180/soc.c
@@ -12,7 +12,7 @@ static void soc_read_resources(struct device *dev)
void *start = NULL;
void *end = NULL;
- ram_range(dev, 0, (uintptr_t)ddr_region->offset, ddr_region->size);
+ ram_range(dev, 0, (uintptr_t)region_offset(ddr_region), region_sz(ddr_region));
reserved_ram_range(dev, 1, (uintptr_t)_dram_aop, REGION_SIZE(dram_aop));
reserved_ram_range(dev, 2, (uintptr_t)_dram_soc, REGION_SIZE(dram_soc));
if (soc_modem_carve_out(&start, &end))
diff --git a/src/soc/qualcomm/sc7280/soc.c b/src/soc/qualcomm/sc7280/soc.c
index e6dbf21978..783c557e4b 100644
--- a/src/soc/qualcomm/sc7280/soc.c
+++ b/src/soc/qualcomm/sc7280/soc.c
@@ -19,7 +19,7 @@ static void soc_read_resources(struct device *dev)
void *start = NULL;
void *end = NULL;
- ram_range(dev, 0, (uintptr_t)ddr_region->offset, ddr_region->size);
+ ram_range(dev, 0, (uintptr_t)region_offset(ddr_region), region_sz(ddr_region));
reserved_ram_range(dev, 1, (uintptr_t)_dram_soc, REGION_SIZE(dram_soc));
reserved_ram_range(dev, 2, (uintptr_t)_dram_wlan, REGION_SIZE(dram_wlan));
reserved_ram_range(dev, 3, (uintptr_t)_dram_wpss, REGION_SIZE(dram_wpss));