diff options
author | Dinesh Gehlot <digehlot@google.com> | 2022-12-02 13:41:18 +0000 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2022-12-10 08:01:33 +0000 |
commit | 5778e06771627a5541ca2b137e783f47257f05ec (patch) | |
tree | 095fe6b443fdcd5f8d08c83750e8097723596c15 /src/soc/intel | |
parent | e7c1f7da25651a649a832157f7cf01176b18cec5 (diff) |
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 <digehlot@google.com>
Change-Id: I914190f2d2d0507c84b19340159990f9b62ce101
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70272
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/meteorlake/acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |