From b324df6a540d154cc9267c0398654f9142aae052 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 26 Mar 2021 11:01:33 +0100 Subject: arch/x86: Provide readXp/writeXp helpers in arch/mmio.h These p-suffixed helpers allow dropping pointer casts in call-sites, which is particularly useful when accessing registers at an offset from a base address. Move existing helpers in chipset code to arch/mmio.h and create the rest accordingly. Change-Id: I36a015456f7b0af1f1bf2fdff9e1ccd1e3b11747 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/51862 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/southbridge/intel/bd82x6x/early_thermal.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/southbridge/intel/bd82x6x') diff --git a/src/southbridge/intel/bd82x6x/early_thermal.c b/src/southbridge/intel/bd82x6x/early_thermal.c index d0051355da..32ad3c2042 100644 --- a/src/southbridge/intel/bd82x6x/early_thermal.c +++ b/src/southbridge/intel/bd82x6x/early_thermal.c @@ -6,21 +6,6 @@ #include "cpu/intel/model_206ax/model_206ax.h" #include -static void write8p(uintptr_t addr, uint8_t val) -{ - write8((uint8_t *)addr, val); -} - -static void write16p(uintptr_t addr, uint16_t val) -{ - write16((uint16_t *)addr, val); -} - -static uint16_t read16p(uintptr_t addr) -{ - return read16((uint16_t *)addr); -} - /* Temporary address for the thermal BAR */ #define TBARB_TEMP 0x40000000 -- cgit v1.2.3