device/resource: Add _kb postfix for resource allocators
There is a lot of going back-and-forth with the KiB arguments, start
the work to migrate away from this.
Change-Id: I329864d36137e9a99b5640f4f504c45a02060a40
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64658
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/qualcomm/ipq40xx/soc.c b/src/soc/qualcomm/ipq40xx/soc.c
index 32a22d5..c99ae6f 100644
--- a/src/soc/qualcomm/ipq40xx/soc.c
+++ b/src/soc/qualcomm/ipq40xx/soc.c
@@ -33,12 +33,12 @@
{
ipq_mem_map_t *ipq_mem_map = ((ipq_mem_map_t *)_dram);
- ram_resource(dev, 0, LINUX_REGION1_START_KB, LINUX_REGION1_SIZE_KB);
+ ram_resource_kb(dev, 0, LINUX_REGION1_START_KB, LINUX_REGION1_SIZE_KB);
- reserved_ram_resource(dev, 1, RESERVED_START_KB, RESERVED_SIZE_KB);
+ reserved_ram_resource_kb(dev, 1, RESERVED_START_KB, RESERVED_SIZE_KB);
/* 0x88000000 to end, is the second region for Linux */
- ram_resource(dev, 2, LINUX_REGION2_START_KB,
+ ram_resource_kb(dev, 2, LINUX_REGION2_START_KB,
(CONFIG_DRAM_SIZE_MB * KiB) -
LINUX_REGION1_SIZE_KB - RESERVED_SIZE_KB);
}
diff --git a/src/soc/qualcomm/ipq806x/soc.c b/src/soc/qualcomm/ipq806x/soc.c
index 327806f..481ffc8 100644
--- a/src/soc/qualcomm/ipq806x/soc.c
+++ b/src/soc/qualcomm/ipq806x/soc.c
@@ -10,8 +10,8 @@
static void soc_read_resources(struct device *dev)
{
/* Reserve bottom 0x150_0000 bytes for NSS, SMEM, etc. */
- reserved_ram_resource(dev, 0, (uintptr_t)_dram / KiB, RESERVED_SIZE_KB);
- ram_resource(dev, 0, (uintptr_t)_dram / KiB + RESERVED_SIZE_KB,
+ reserved_ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, RESERVED_SIZE_KB);
+ ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB + RESERVED_SIZE_KB,
(CONFIG_DRAM_SIZE_MB * KiB) - RESERVED_SIZE_KB);
}
diff --git a/src/soc/qualcomm/qcs405/soc.c b/src/soc/qualcomm/qcs405/soc.c
index 1237bb3..4bcad74 100644
--- a/src/soc/qualcomm/qcs405/soc.c
+++ b/src/soc/qualcomm/qcs405/soc.c
@@ -7,8 +7,8 @@
static void soc_read_resources(struct device *dev)
{
- ram_resource(dev, 0, (uintptr_t)_dram / KiB, (1 * GiB) / KiB);
- reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB,
+ ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, (1 * GiB) / KiB);
+ reserved_ram_resource_kb(dev, 1, (uintptr_t)_dram_reserved / KiB,
REGION_SIZE(dram_reserved) / KiB);
}
diff --git a/src/soc/qualcomm/sc7180/soc.c b/src/soc/qualcomm/sc7180/soc.c
index af274d2..c78121e 100644
--- a/src/soc/qualcomm/sc7180/soc.c
+++ b/src/soc/qualcomm/sc7180/soc.c
@@ -12,14 +12,14 @@
void *start = NULL;
void *end = NULL;
- ram_resource(dev, 0, (uintptr_t)ddr_region->offset / KiB,
+ ram_resource_kb(dev, 0, (uintptr_t)ddr_region->offset / KiB,
ddr_region->size / KiB);
- reserved_ram_resource(dev, 1, (uintptr_t)_dram_aop / KiB,
+ reserved_ram_resource_kb(dev, 1, (uintptr_t)_dram_aop / KiB,
REGION_SIZE(dram_aop) / KiB);
- reserved_ram_resource(dev, 2, (uintptr_t)_dram_soc / KiB,
+ reserved_ram_resource_kb(dev, 2, (uintptr_t)_dram_soc / KiB,
REGION_SIZE(dram_soc) / KiB);
if (soc_modem_carve_out(&start, &end))
- reserved_ram_resource(dev, 3, (uintptr_t)start / KiB, (end - start) / KiB);
+ reserved_ram_resource_kb(dev, 3, (uintptr_t)start / KiB, (end - start) / KiB);
}
static void soc_init(struct device *dev)
diff --git a/src/soc/qualcomm/sc7280/soc.c b/src/soc/qualcomm/sc7280/soc.c
index 98b62cc..2407439 100644
--- a/src/soc/qualcomm/sc7280/soc.c
+++ b/src/soc/qualcomm/sc7280/soc.c
@@ -12,20 +12,20 @@
void *start = NULL;
void *end = NULL;
- ram_resource(dev, 0, (uintptr_t)ddr_region->offset / KiB,
+ ram_resource_kb(dev, 0, (uintptr_t)ddr_region->offset / KiB,
ddr_region->size / KiB);
- reserved_ram_resource(dev, 1, (uintptr_t)_dram_soc / KiB,
+ reserved_ram_resource_kb(dev, 1, (uintptr_t)_dram_soc / KiB,
REGION_SIZE(dram_soc) / KiB);
- reserved_ram_resource(dev, 2, (uintptr_t)_dram_wlan / KiB,
+ reserved_ram_resource_kb(dev, 2, (uintptr_t)_dram_wlan / KiB,
REGION_SIZE(dram_wlan) / KiB);
- reserved_ram_resource(dev, 3, (uintptr_t)_dram_wpss / KiB,
+ reserved_ram_resource_kb(dev, 3, (uintptr_t)_dram_wpss / KiB,
REGION_SIZE(dram_wpss) / KiB);
- reserved_ram_resource(dev, 4, (uintptr_t)_dram_aop / KiB,
+ reserved_ram_resource_kb(dev, 4, (uintptr_t)_dram_aop / KiB,
REGION_SIZE(dram_aop) / KiB);
- reserved_ram_resource(dev, 5, (uintptr_t)_dram_cpucp / KiB,
+ reserved_ram_resource_kb(dev, 5, (uintptr_t)_dram_cpucp / KiB,
REGION_SIZE(dram_cpucp) / KiB);
if (soc_modem_carve_out(&start, &end))
- reserved_ram_resource(dev, 6, (uintptr_t)start / KiB, (end - start) / KiB);
+ reserved_ram_resource_kb(dev, 6, (uintptr_t)start / KiB, (end - start) / KiB);
}
static void soc_init(struct device *dev)