From 6df8ba45e04724cd8cbcb556df43a61ad271ab6f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 5 Jul 2023 11:44:45 +0200 Subject: [PATCH] mb/emulation/*: Use newer function for resource declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Heymans Change-Id: Idd623e99ee20ad94e493c8560cfdac9f7baaf890 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76281 Reviewed-by: Kyösti Mälkki Tested-by: build bot (Jenkins) --- src/mainboard/emulation/qemu-power9/mainboard.c | 2 +- src/mainboard/emulation/qemu-riscv/mainboard.c | 2 +- src/mainboard/emulation/spike-riscv/mainboard.c | 2 +- src/mainboard/sifive/hifive-unleashed/mainboard.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mainboard/emulation/qemu-power9/mainboard.c b/src/mainboard/emulation/qemu-power9/mainboard.c index 542339da0a..5af49247e0 100644 --- a/src/mainboard/emulation/qemu-power9/mainboard.c +++ b/src/mainboard/emulation/qemu-power9/mainboard.c @@ -8,7 +8,7 @@ static void mainboard_enable(struct device *dev) { if (!dev) die("No dev0; die\n"); - ram_resource_kb(dev, 0, 0, (unsigned long)cbmem_top() / KiB); + ram_range(dev, 0, 0, (unsigned long)cbmem_top()); } struct chip_operations mainboard_ops = { diff --git a/src/mainboard/emulation/qemu-riscv/mainboard.c b/src/mainboard/emulation/qemu-riscv/mainboard.c index af0df9c9b4..f0f0740484 100644 --- a/src/mainboard/emulation/qemu-riscv/mainboard.c +++ b/src/mainboard/emulation/qemu-riscv/mainboard.c @@ -14,7 +14,7 @@ static void mainboard_enable(struct device *dev) } dram_mb_detected = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB); - ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, dram_mb_detected * MiB / KiB); + ram_range(dev, 0, (uintptr_t)_dram, dram_mb_detected * MiB); } struct chip_operations mainboard_ops = { diff --git a/src/mainboard/emulation/spike-riscv/mainboard.c b/src/mainboard/emulation/spike-riscv/mainboard.c index 2454f0462f..a3857f8262 100644 --- a/src/mainboard/emulation/spike-riscv/mainboard.c +++ b/src/mainboard/emulation/spike-riscv/mainboard.c @@ -17,7 +17,7 @@ static void mainboard_enable(struct device *dev) die("No dev0; die\n"); } - ram_resource_kb(dev, 0, 0x80000000/KiB, ram_size/KiB); + ram_range(dev, 0, 0x80000000, ram_size); } struct chip_operations mainboard_ops = { diff --git a/src/mainboard/sifive/hifive-unleashed/mainboard.c b/src/mainboard/sifive/hifive-unleashed/mainboard.c index 9dde848406..90090d0f72 100644 --- a/src/mainboard/sifive/hifive-unleashed/mainboard.c +++ b/src/mainboard/sifive/hifive-unleashed/mainboard.c @@ -6,7 +6,7 @@ static void mainboard_enable(struct device *dev) { - ram_resource_kb(dev, 0, (uintptr_t)_dram/KiB, sdram_size_mb()*KiB); + ram_range(dev, 0, (uintptr_t)_dram, sdram_size_mb()); } struct chip_operations mainboard_ops = {