From f585c6eeeafb575cc64452d8519a172ffb4ffc8b Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 25 Jun 2021 10:09:35 +0200 Subject: soc/intel: Drop casts around `soc_read_pmc_base()` The `soc_read_pmc_base()` function returns an `uintptr_t`, which is then casted to a pointer type for use with `read32()` and/or `write32()`. But since commit b324df6a540d154cc9267c0398654f9142aae052 (arch/x86: Provide readXp/writeXp helpers in arch/mmio.h), the `read32p()` and `write32p()` functions live in `arch/mmio.h`. These functions use the `uintptr_t type for the address parameter instead of a pointer type, and using them with the `soc_read_pmc_base()` function allows dropping the casts to pointer. Change-Id: Iaf16e6f23d139e6f79360d9a29576406b7b15b07 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/55840 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Subrata Banik --- src/soc/intel/tigerlake/acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/soc/intel/tigerlake') diff --git a/src/soc/intel/tigerlake/acpi.c b/src/soc/intel/tigerlake/acpi.c index e8d665c322..1a8ccb9e93 100644 --- a/src/soc/intel/tigerlake/acpi.c +++ b/src/soc/intel/tigerlake/acpi.c @@ -166,8 +166,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) uint32_t soc_read_sci_irq_select(void) { - uintptr_t pmc_bar = soc_read_pmc_base(); - return read32((void *)pmc_bar + IRQ_REG); + return read32p(soc_read_pmc_base() + IRQ_REG); } static unsigned long soc_fill_dmar(unsigned long current) -- cgit v1.2.3