soc/amd/common/data_fabric/extended_mmio: fix compile errors

This code only gets built when the SOC selects
SOC_AMD_COMMON_BLOCK_DATA_FABRIC_EXTENDED_MMIO which no SoC before Genoa
does.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia5495ebf0f157fd0c456ce44acaf1ab222a188dd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78340
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held 2023-10-13 21:32:24 +02:00
parent 6f255729f1
commit 060b27da6a
1 changed files with 5 additions and 4 deletions

View File

@ -10,13 +10,14 @@ void data_fabric_get_mmio_base_size(unsigned int reg, resource_t *mmio_base,
{ {
const uint32_t base_reg = data_fabric_broadcast_read32(DF_MMIO_BASE(reg)); const uint32_t base_reg = data_fabric_broadcast_read32(DF_MMIO_BASE(reg));
const uint32_t limit_reg = data_fabric_broadcast_read32(DF_MMIO_LIMIT(reg)); const uint32_t limit_reg = data_fabric_broadcast_read32(DF_MMIO_LIMIT(reg));
const union df_mmio_addr_ext ext_reg.raw = const union df_mmio_addr_ext ext_reg = {
data_fabric_broadcast_read32(DF_MMIO_ADDR_EXT(reg)); .raw = data_fabric_broadcast_read32(DF_MMIO_ADDR_EXT(reg))
};
/* The raw register values in the base and limit registers are bits 47..16 of the /* The raw register values in the base and limit registers are bits 47..16 of the
actual address. The MMIO address extension register contains the extended MMIO base actual address. The MMIO address extension register contains the extended MMIO base
and limit bits starting with bit 48 of the actual address. */ and limit bits starting with bit 48 of the actual address. */
*mmio_base = (resource_t)ext_reg.base_ext << DF_MMIO_EXT_ADDR_SHIFT | *mmio_base = (resource_t)ext_reg.base_ext << DF_MMIO_EXT_ADDR_SHIFT |
(resource_t)base_reg << DF_MMIO_SHIFT; (resource_t)base_reg << DF_MMIO_SHIFT;
*mmio_limit = (resource_t)ext_reg.limit_ext << DF_MMIO_EXT_ADDR_SHIFT | *mmio_limit = ((resource_t)ext_reg.limit_ext << DF_MMIO_EXT_ADDR_SHIFT |
(((resource_t)limit_reg + 1) << DF_MMIO_SHIFT) - 1; (((resource_t)limit_reg + 1) << DF_MMIO_SHIFT)) - 1;
} }