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/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c
index ed61c10..8dc173c 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi.c
+++ b/src/soc/intel/common/block/fast_spi/fast_spi.c
@@ -529,7 +529,7 @@
 	pci_dev_read_resources(dev);
 
 	/* Add SPI flash MMIO window as a reserved resource. */
-	mmio_resource(dev, 0, FLASH_BASE_ADDR / KiB, FLASH_MMIO_SIZE / KiB);
+	mmio_resource_kb(dev, 0, FLASH_BASE_ADDR / KiB, FLASH_MMIO_SIZE / KiB);
 }
 
 static struct device_operations fast_spi_dev_ops = {
diff --git a/src/soc/intel/common/block/p2sb/ioe_p2sb.c b/src/soc/intel/common/block/p2sb/ioe_p2sb.c
index 85d8bc1..e806417 100644
--- a/src/soc/intel/common/block/p2sb/ioe_p2sb.c
+++ b/src/soc/intel/common/block/p2sb/ioe_p2sb.c
@@ -28,7 +28,7 @@
 
 static void read_resources(struct device *dev)
 {
-	mmio_resource(dev, 0, IOE_P2SB_BAR / KiB, IOE_P2SB_SIZE / KiB);
+	mmio_resource_kb(dev, 0, IOE_P2SB_BAR / KiB, IOE_P2SB_SIZE / KiB);
 }
 
 struct device_operations device_ops = {
diff --git a/src/soc/intel/common/block/p2sb/p2sb.c b/src/soc/intel/common/block/p2sb/p2sb.c
index c23947c..910f01d 100644
--- a/src/soc/intel/common/block/p2sb/p2sb.c
+++ b/src/soc/intel/common/block/p2sb/p2sb.c
@@ -128,7 +128,7 @@
 	 * The following code makes sure that it doesn't change if the device
 	 * is visible and the resource allocator is being run.
 	 */
-	mmio_resource(dev, PCI_BASE_ADDRESS_0, P2SB_BAR / KiB, P2SB_SIZE / KiB);
+	mmio_resource_kb(dev, PCI_BASE_ADDRESS_0, P2SB_BAR / KiB, P2SB_SIZE / KiB);
 }
 
 static const struct device_operations device_ops = {
diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c
index 19a413f..1d88d6a 100644
--- a/src/soc/intel/common/block/systemagent/systemagent.c
+++ b/src/soc/intel/common/block/systemagent/systemagent.c
@@ -108,7 +108,7 @@
 			sa_fixed_resources[i].description, sa_fixed_resources[i].base,
 			sa_fixed_resources[i].size);
 
-		mmio_resource(dev, index++, base / KiB, size / KiB);
+		mmio_resource_kb(dev, index++, base / KiB, size / KiB);
 	}
 
 	*resource_cnt = index;
@@ -197,26 +197,26 @@
 	/* 0 - > 0xa0000 */
 	base_k = 0;
 	size_k = (0xa0000 / KiB) - base_k;
-	ram_resource(dev, index++, base_k, size_k);
+	ram_resource_kb(dev, index++, base_k, size_k);
 
 	/* 0xc0000 -> top_of_ram */
 	base_k = 0xc0000 / KiB;
 	size_k = (top_of_ram / KiB) - base_k;
-	ram_resource(dev, index++, base_k, size_k);
+	ram_resource_kb(dev, index++, base_k, size_k);
 
 	sa_get_mem_map(dev, &sa_map_values[0]);
 
 	/* top_of_ram -> TOLUD */
 	base_k = top_of_ram;
 	size_k = sa_map_values[SA_TOLUD_REG] - base_k;
-	mmio_resource(dev, index++, base_k / KiB, size_k / KiB);
+	mmio_resource_kb(dev, index++, base_k / KiB, size_k / KiB);
 
 	/* 4GiB -> TOUUD */
 	base_k = 4 * (GiB / KiB); /* 4GiB */
 	touud_k = sa_map_values[SA_TOUUD_REG] / KiB;
 	size_k = touud_k - base_k;
 	if (touud_k > base_k)
-		ram_resource(dev, index++, base_k, size_k);
+		ram_resource_kb(dev, index++, base_k, size_k);
 
 	/*
 	 * Reserve everything between A segment and 1MB:
@@ -224,8 +224,8 @@
 	 * 0xa0000 - 0xbffff: legacy VGA
 	 * 0xc0000 - 0xfffff: RAM
 	 */
-	mmio_resource(dev, index++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB);
-	reserved_ram_resource(dev, index++, 0xc0000 / KiB,
+	mmio_resource_kb(dev, index++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB);
+	reserved_ram_resource_kb(dev, index++, 0xc0000 / KiB,
 			(1*MiB - 0xc0000) / KiB);
 
 	*resource_count = index;
@@ -249,7 +249,7 @@
 	 * out of MTRRs. Memory reserved by IMRs is not usable for host
 	 * so mark it reserved.
 	 */
-	reserved_ram_resource(dev, idx, base_k, size_k);
+	reserved_ram_resource_kb(dev, idx, base_k, size_k);
 }
 
 /*
@@ -295,7 +295,7 @@
 
 	/* Reserve the window used for extended BIOS decoding. */
 	if (CONFIG(FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW))
-		mmio_resource(dev, index++, CONFIG_EXT_BIOS_WIN_BASE / KiB,
+		mmio_resource_kb(dev, index++, CONFIG_EXT_BIOS_WIN_BASE / KiB,
 			      CONFIG_EXT_BIOS_WIN_SIZE / KiB);
 }