summaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2022-05-24 20:25:58 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-06-22 12:30:15 +0000
commit27d6299d51744bda549b7764b8fde909ad812e33 (patch)
treec30a57ff78e57c9c79a74c4b27cc6e5dfbc94a49 /src/soc/intel/baytrail
parent37b161fb96c602765fef9f64415f809830b915a4 (diff)
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>
Diffstat (limited to 'src/soc/intel/baytrail')
-rw-r--r--src/soc/intel/baytrail/lpe.c2
-rw-r--r--src/soc/intel/baytrail/northcluster.c16
-rw-r--r--src/soc/intel/baytrail/southcluster.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/soc/intel/baytrail/lpe.c b/src/soc/intel/baytrail/lpe.c
index 03ac736793..851f52e2a5 100644
--- a/src/soc/intel/baytrail/lpe.c
+++ b/src/soc/intel/baytrail/lpe.c
@@ -147,7 +147,7 @@ static void lpe_read_resources(struct device *dev)
{
pci_dev_read_resources(dev);
- reserved_ram_resource(dev, FIRMWARE_PCI_REG_BASE,
+ reserved_ram_resource_kb(dev, FIRMWARE_PCI_REG_BASE,
FIRMWARE_PHYS_BASE >> 10,
FIRMWARE_PHYS_LENGTH >> 10);
}
diff --git a/src/soc/intel/baytrail/northcluster.c b/src/soc/intel/baytrail/northcluster.c
index cd8c6d4fd7..5b728e7313 100644
--- a/src/soc/intel/baytrail/northcluster.c
+++ b/src/soc/intel/baytrail/northcluster.c
@@ -77,12 +77,12 @@ static void nc_read_resources(struct device *dev)
/* PCIe memory-mapped config space access - 256 MiB. */
mmconf = iosf_bunit_read(BUNIT_MMCONF_REG) & ~((1 << 28) - 1);
- mmio_resource(dev, BUNIT_MMCONF_REG, RES_IN_KiB(mmconf), 256 * 1024);
+ mmio_resource_kb(dev, BUNIT_MMCONF_REG, RES_IN_KiB(mmconf), 256 * 1024);
/* 0 -> 0xa0000 */
base_k = RES_IN_KiB(0);
size_k = RES_IN_KiB(0xa0000) - base_k;
- ram_resource(dev, index++, base_k, size_k);
+ ram_resource_kb(dev, index++, base_k, size_k);
/* The SMMRR registers are 1MiB granularity with smmrrh being
* inclusive of the SMM region. */
@@ -92,14 +92,14 @@ static void nc_read_resources(struct device *dev)
/* 0xc0000 -> smrrl - cacheable and usable */
base_k = RES_IN_KiB(0xc0000);
size_k = smmrrl - base_k;
- ram_resource(dev, index++, base_k, size_k);
+ ram_resource_kb(dev, index++, base_k, size_k);
if (smmrrh > smmrrl)
- reserved_ram_resource(dev, index++, smmrrl, smmrrh - smmrrl);
+ reserved_ram_resource_kb(dev, index++, smmrrl, smmrrh - smmrrl);
/* All address space between bmbound and smmrrh is unusable. */
bmbound_k = RES_IN_KiB(nc_read_top_of_low_memory());
- mmio_resource(dev, index++, smmrrh, bmbound_k - smmrrh);
+ mmio_resource_kb(dev, index++, smmrrh, bmbound_k - smmrrh);
/*
* The BMBOUND_HI register matches register bits of 31:24 with address
@@ -108,7 +108,7 @@ static void nc_read_resources(struct device *dev)
bmbound_hi = iosf_bunit_read(BUNIT_BMBOUND_HI) & ~((1 << 24) - 1);
bmbound_hi = RES_IN_KiB(bmbound_hi) << 4;
if (bmbound_hi > four_gig_kib)
- ram_resource(dev, index++, four_gig_kib, bmbound_hi - four_gig_kib);
+ ram_resource_kb(dev, index++, four_gig_kib, bmbound_hi - four_gig_kib);
/*
* Reserve everything between A segment and 1MB:
@@ -116,8 +116,8 @@ static void nc_read_resources(struct device *dev)
* 0xa0000 - 0xbffff: legacy VGA
* 0xc0000 - 0xfffff: RAM
*/
- mmio_resource(dev, index++, (0xa0000 >> 10), (0xc0000 - 0xa0000) >> 10);
- reserved_ram_resource(dev, index++, (0xc0000 >> 10), (0x100000 - 0xc0000) >> 10);
+ mmio_resource_kb(dev, index++, (0xa0000 >> 10), (0xc0000 - 0xa0000) >> 10);
+ reserved_ram_resource_kb(dev, index++, (0xc0000 >> 10), (0x100000 - 0xc0000) >> 10);
}
static void nc_generate_ssdt(const struct device *dev)
diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c
index 8356e5d641..57205459db 100644
--- a/src/soc/intel/baytrail/southcluster.c
+++ b/src/soc/intel/baytrail/southcluster.c
@@ -26,7 +26,7 @@
static inline void add_mmio_resource(struct device *dev, int i, unsigned long addr,
unsigned long size)
{
- mmio_resource(dev, i, addr >> 10, size >> 10);
+ mmio_resource_kb(dev, i, addr >> 10, size >> 10);
}
static void sc_add_mmio_resources(struct device *dev)