From 5778e06771627a5541ca2b137e783f47257f05ec Mon Sep 17 00:00:00 2001 From: Dinesh Gehlot Date: Fri, 2 Dec 2022 13:41:18 +0000 Subject: [PATCH] soc/intel/meteorlake: 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 b324df6a540d ("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. BUG=none TEST=Build and Boot verified on google/rex Port of 'commit f585c6eeeafb ("soc/intel: Drop casts around `soc_read_pmc_base()`")' Signed-off-by: Dinesh Gehlot Change-Id: I914190f2d2d0507c84b19340159990f9b62ce101 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70272 Reviewed-by: Elyes Haouas Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/intel/meteorlake/acpi.c b/src/soc/intel/meteorlake/acpi.c index 93cb992254..66e6384a34 100644 --- a/src/soc/intel/meteorlake/acpi.c +++ b/src/soc/intel/meteorlake/acpi.c @@ -169,7 +169,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) uint32_t soc_read_sci_irq_select(void) { - return read32((void *)soc_read_pmc_base() + IRQ_REG); + return read32p(soc_read_pmc_base() + IRQ_REG); } static unsigned long soc_fill_dmar(unsigned long current)