diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-05-24 20:25:58 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-06-22 12:30:15 +0000 |
commit | 27d6299d51744bda549b7764b8fde909ad812e33 (patch) | |
tree | c30a57ff78e57c9c79a74c4b27cc6e5dfbc94a49 /src/soc/intel/braswell | |
parent | 37b161fb96c602765fef9f64415f809830b915a4 (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/braswell')
-rw-r--r-- | src/soc/intel/braswell/lpe.c | 2 | ||||
-rw-r--r-- | src/soc/intel/braswell/northcluster.c | 18 | ||||
-rw-r--r-- | src/soc/intel/braswell/southcluster.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/soc/intel/braswell/lpe.c b/src/soc/intel/braswell/lpe.c index 109ad84772..27f38ead5d 100644 --- a/src/soc/intel/braswell/lpe.c +++ b/src/soc/intel/braswell/lpe.c @@ -154,7 +154,7 @@ static void lpe_read_resources(struct device *dev) res->align = 12; res->flags = IORESOURCE_MEM; - reserved_ram_resource(dev, FIRMWARE_PCI_REG_BASE, FIRMWARE_PHYS_BASE >> 10, + reserved_ram_resource_kb(dev, FIRMWARE_PCI_REG_BASE, FIRMWARE_PHYS_BASE >> 10, FIRMWARE_PHYS_LENGTH >> 10); } diff --git a/src/soc/intel/braswell/northcluster.c b/src/soc/intel/braswell/northcluster.c index d9a516d57d..a39b6db030 100644 --- a/src/soc/intel/braswell/northcluster.c +++ b/src/soc/intel/braswell/northcluster.c @@ -99,26 +99,26 @@ 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); /* High memory -> fsp_res_base - cacheable and usable */ base_k = RES_IN_KiB(0x100000); size_k = fsp_res_base_k - base_k; - ram_resource(dev, index++, base_k, size_k); + ram_resource_kb(dev, index++, base_k, size_k); /* fsp_res_base -> tseg_top - Reserved */ base_k = fsp_res_base_k; size_k = tseg_top_k - base_k; - reserved_ram_resource(dev, index++, base_k, size_k); + reserved_ram_resource_kb(dev, index++, base_k, size_k); /* TSEG TOP -> bmbound is memory backed mmio. */ bmbound_k = RES_IN_KiB(nc_read_top_of_low_memory()); - mmio_resource(dev, index++, tseg_top_k, bmbound_k - tseg_top_k); + mmio_resource_kb(dev, index++, tseg_top_k, bmbound_k - tseg_top_k); /* * The BMBOUND_HI register matches register bits of 31:24 with address @@ -127,7 +127,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: @@ -135,15 +135,15 @@ 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); /* * Reserve local APIC */ base_k = RES_IN_KiB(LAPIC_DEFAULT_BASE); size_k = RES_IN_KiB(0x00100000); - mmio_resource(dev, index++, base_k, size_k); + mmio_resource_kb(dev, index++, base_k, size_k); } static void nc_generate_ssdt(const struct device *dev) diff --git a/src/soc/intel/braswell/southcluster.c b/src/soc/intel/braswell/southcluster.c index c058850c5e..0f762fcb8c 100644 --- a/src/soc/intel/braswell/southcluster.c +++ b/src/soc/intel/braswell/southcluster.c @@ -48,7 +48,7 @@ static void sc_set_serial_irqs_mode(struct device *dev, enum serirq_mode mode) 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) |