From 12beaea5e21e0e4db2608840cc78b8bee04320c8 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 10 Sep 2020 01:56:03 +0200 Subject: superio/nuvoton: Inline `nuvoton_hwm_select_bank` There's no need to place a single-line function in its own compilation unit, and then guard it behind a Kconfig symbol. This also allows using this function in stages other than ramstage. Change-Id: I103a4ea4cef24844d382854c9358bbb37d229e04 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/42130 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/superio/nuvoton/common/hwm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/superio/nuvoton/common/hwm.h') diff --git a/src/superio/nuvoton/common/hwm.h b/src/superio/nuvoton/common/hwm.h index 47d4e04e41..42e0f4af94 100644 --- a/src/superio/nuvoton/common/hwm.h +++ b/src/superio/nuvoton/common/hwm.h @@ -6,7 +6,13 @@ /* Nuvoton is a Winbond spin-off, so this code is for both */ #include +#include -void nuvoton_hwm_select_bank(const u16 base, const u8 bank); +#define HWM_BANK_SELECT 0x4e + +static inline void nuvoton_hwm_select_bank(const u16 base, const u8 bank) +{ + pnp_write_hwm5_index(base, HWM_BANK_SELECT, bank); +} #endif /* SUPERIO_NUVOTON_COMMON_HWM_H */ -- cgit v1.2.3